Retrieve data from Excel sheet for Mysql table
0
0
Entering edit mode
7.1 years ago

Dear all I have retrieved some data from databases and literature and need to keep this data in a mysql table and display it in a webpage. Data in a excel sheet is like this

coloumn1 coloumn2 coloumn3
geneid1 value1 value2
geneid2 value3 value8
geneid3 value9 value0
geneid3 value7 value0
geneid3 value9 value0

I have loaded it into mysql table and want to make a query such that it display only unique values on a webpage related to coloumn1. like

geneid3 value9 value0 value7
MySQL Excel Perl PHP • 2.3k views
ADD COMMENT
2
Entering edit mode

I would suggest just dumping the data to a tabular format such as .tsv or .csv and then importing it into the DB that way. I've got a quick & easy Python script to dump .xlsx using Pandas here

ADD REPLY
0
Entering edit mode

Also it sounds like you have your data in a wide format, I think for a SQL database you might want it in long format instead. I typically use R for processing tabular data, particularly with the reshape2::melt function to convert from wide to long; details here.

Might be more helpful if you posted a small sample of the exact data

ADD REPLY
0
Entering edit mode

My concern is with duplicate values for geneid3.What to do with this?

ADD REPLY
0
Entering edit mode

going to need to see an actual sample of the data to be able to make a suggestion

ADD REPLY
0
Entering edit mode

sharmatina189059 : Please consider validating comments/answers from your past questions (you have posted several by now). Acknowledging help you receive here (by up-voting/accepting answers) is a good way of thanking people.

ADD REPLY
0
Entering edit mode

My apology for the same.. I am very thankful to all..

ADD REPLY
0
Entering edit mode

if would say it's not related to bioinformatics: it's just data management , see any LAMP (Linux-Apache-MySQL-PHP) tutorial. e.g: http://www.andrew.cmu.edu/course/95-799/LAMP-Howto/lamp-linux-apache-mysql-php.html

ADD REPLY
0
Entering edit mode
$iname = "SELECT Gene_name, Pathway_name, Reaction fROM Pathway WHERE Gene_name in (SELECT Gene_name from Pathway GROUP BY Gene_name having count(*) > 1 LIKE '%$find%')";

I am using this command but it is not working...Am I doing something wrong?

ADD REPLY

Login before adding your answer.

Traffic: 1714 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6