Zen Cart Logo
Forums / General Questions / Question for a MYSQL Guru

Question for a MYSQL Guru

Locked

Views: 1,626

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
30 May 2006, 23:41
#1
rickstorm avatar

rickstorm

New Zenner

Join Date:
Jul 2005
Location:
Beaverton, Oregon
Posts:
18
Plugin Contributions:
0

Question for a MYSQL Guru

Im sorry if this is a way off question but someone asked me and I'd hate to tell them no not knowing for sure..
Anyways... Can an excel file be imported into a database, for example.. Zencart, lol threw phpmyadmin? I figuring no but I thought Id ask in case it will some weird way. A customer has her catalog in a excel spreadsheet and wanted to import it into zen cart...
Thanks

31 May 2006, 00:13
#2
bunyip avatar

bunyip

Totally Zenned

Join Date:
Sep 2004
Location:
Western Massachusetts
Posts:
2,361
Plugin Contributions:
1

Re: Question for a MYSQL Guru

It is possible: the easiest way is to simply use a concatenate formula to output an sql query string.

I posted a response that included an example of how to do it in this post a few months back.

I'm sure you'll find more examples if you put 'concatenate' into the search box at the top of this forum.

31 May 2006, 16:47
#3
jollyjim avatar

jollyjim

Totally Zenned

Join Date:
May 2005
Location:
Cheshire, UK
Posts:
401
Plugin Contributions:
2

Re: Question for a MYSQL Guru

Yes it can be done. You can pretty much load anything you like into mysql as long it is in the correct format. Navicat is better than PHPMyadmin for getting Excel data into the mysql database since it imports several formats without needing to use code.

More complicated methods are to use Load Data Infile commands folowed by the file type etc. It has been a long tme since I had to do this so I cannot remember the exact query strings.

A simple but clever method of getting excel data into mysql using phpmyadmin is to save the excel data as a Comma or Tab delimited text file and then import this text file into the database from the front page of PHPMyAdmin where it says "import".

It is important to understand how the different tables in the zencart database are structured and mimic them in the excel spreadsheet. You also need to know how they relate to one another. Anything less and you end up with a very messy database.

31 May 2006, 19:12
#4
rickstorm avatar

rickstorm

New Zenner

Join Date:
Jul 2005
Location:
Beaverton, Oregon
Posts:
18
Plugin Contributions:
0

Re: Question for a MYSQL Guru

Wow, Im glad momma taught me to keep my mouth shut unless I know the answer for sure, lol.. I think ill create another zen cart and try these methods.. it makes sence.. Kind of, but I love to play with new things and new ideas lol
thank you bunnyip and jollyjim you may have just created a big mess for someone, lmao

Rick