|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today! |
|
#1
|
|||
|
|||
|
MySQL Table Dump
Can anyone help with the command for exporting the data within my MySQL table to a Microsoft Excel (csv) format splitting columns with a ","?
|
|
#2
|
|||
|
|||
|
RE: MySQL Table Dump
Would a php script do the job, or do you mean command line?
|
|
#3
|
|||||
|
|||||
|
RE: MySQL Table Dump
You can do this using the mysqldump utility.
I would encourage you to read up on it a bit more, but the syntax will be something like: php Code:
You should be able to find more info on mysqldump on the mysql.com website. Cheers, Keith. |
|
#4
|
|||
|
|||
|
RE: MySQL Table Dump
Wow, i didn't realize mysqldump was so flexible! I've always just assumed you simply dump structures and data in the "INSERT..." format to a text file and that was that..
Cool. |
|
#5
|
|||
|
|||
|
RE: MySQL Table Dump
A PHP script would be the answer I am looking for if possible
|
|
#6
|
|||||
|
|||||
|
RE: MySQL Table Dump
How about this:
php Code:
Cheers, Keith. |
|
#7
|
|||||
|
|||||
|
RE: MySQL Table Dump
Well, just imploding with commas would not be enough. You also have to eliminate the new-line characters from the fields, embrace them with quotation marks and double the quotation marks inside the fields (according the the CSV format specifications). So the code would look sth like this: php Code:
|
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > MySQL Table Dump |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
![]() |
|