Dumping Only Data

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Dumping Only Data

Postby pplastiras » 24. June 2011 16:39

Hi,

I’m new to this forum and I need some help. I’m trying to export only data from a database using mysqldump method. In a similar use of this method I can export both data and structure using the commant below:

Code: Select all
$creatBackup = "c:/xampp/mysql/bin/mysqldump.exe -u ".$username." --password=".$password." ".$db_name." applications> ".$backupFile;


Where:
$username = database username
$password = database password
$db_name = database name
$backupFile = file name + path

When I use this command, I get a result. But when I’m trying to create a file with only data I take nothing. Please help me!!!!! 
pplastiras
 
Posts: 6
Joined: 24. June 2011 16:32

Re: Dumping Only Data

Postby JonB » 25. June 2011 02:09

OK - here's recipe where you will need to adjust the ingredients

A. -- Start phpMyadmin (http://localhost/phpmyadmin

B. -- selct the database you wish to export (left column) and click to make it the active database

C. -- whent the screeen is refreshed. select the "export' tab.

D. -- you will get a page with all the options to export the data 'only' from the selected database (with too many options to describe).

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Dumping Only Data

Postby pplastiras » 25. June 2011 02:49

Thanks for the help but I want to export database data with a php script.... Sorry, it was my falt I did not explain it well in the previous answer. :D
pplastiras
 
Posts: 6
Joined: 24. June 2011 16:32

Re: Dumping Only Data

Postby JonB » 25. June 2011 05:49

OK, I think I have soem good news for you

BUT my regular internet is out right now :shock:
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Dumping Only Data

Postby pplastiras » 25. June 2011 19:06

I'm waitting for you!!! 8) 8) :lol: :lol: :D :D :D :mrgreen:
pplastiras
 
Posts: 6
Joined: 24. June 2011 16:32

Re: Dumping Only Data

Postby JonB » 26. June 2011 16:16

Well, my regular internet is back (cable problem)

I should point out that every database has different tables and columns, so no matter what you do there will be the matter of proper queries.

There's a way to have phpMyAdmin help you: (I was hoping you would explore there)

You can use either the SQL or Search tabs to create queries that output the results you need.

If you are using the Query Tab, cut/copy the Query and paste it into the SQL Query window

run the Query (see results table) -- when the query is run, you will see an option to 'create PHP code' this will write the query in a form that will return an array that you can use in PHP to output the data (to whatever you want).

I'm quite sure this is not as complete a solution as you may have desired, but read my first point an try to get where its coming from. Any true 'database' is self-defining, so you have to look inside with a tool FIRST, then instruct it what to do in its command language (now almost universally SQL -- Structured Query Language). Also, realize that there really is no such thing as truly 'raw' data, all data has to be structured so the receiver can format it meaningfully. The simplest forms are comma, quote, or tab delimited text. (CSV).

There are other tools such as Navicat, and phpMyEdit (plus many many more) that can help create code. Some are free, others (like Navicat) are just a good investment.

http://www.navicat.com/en/
http://www.phpmyedit.org/

You could also look at this sample, its quite straightforward:
http://www.tutorial5.com/content/view/159/85/

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Dumping Only Data

Postby pplastiras » 26. June 2011 17:45

thanks for your advices. I have already download Navicat and i will explore it. If i find a solution i will let you know. Thanks again for your help. :lol:
pplastiras
 
Posts: 6
Joined: 24. June 2011 16:32


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 60 guests