[PHP] Script to export MySQL structure & data

2003-01-31 Thread Janos Rusiczki
Hello,

I'm looking for a premade PHP script / class or a tutorial on how to 
export the structure and data of a few given MySQL tables as seen in 
phpMyAdmin.

Any ideeas would be also appreciated.

I searched the major web sites (like hotscripts.com, phpclasses.org) and 
this list's archive but I still couldn't find any real answer for my 
problem.

-j-


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Script to export MySQL structure & data

2003-01-31 Thread Janos Rusiczki
I knew the mysqldump method. I'm using it frequently. My problem is that
I'm writing this script for a client and I do not have shell access to
his host. Or should I run mysqldump from PHP? I want a general
solution which could be re-usable an all hosts wheter I can access
mysqldump or not.

So, a script or ideeas from somebody who already did this would be
really appreciated. Otherwise I have no other alternative than mining
the phpMyAdmin sourcecode.

Brent Baisley wrote:


I'm pretty sure you're looking in the wrong place. The command you are 
looking for is mysqldump and it is part of the mysql command set. With 
the right parameters it will create a file that can be used to restore 
your entire database to a working state.
I'm not sure how PHPAdmin does it. I use a shell script and cron to 
run the command nightly and then ftp the file to another machine. 
Cheap and easy backup.

On Friday, January 31, 2003, at 04:36 PM, Janos Rusiczki wrote:

I'm looking for a premade PHP script / class or a tutorial on how to 
export the structure and data of a few given MySQL tables as seen in 
phpMyAdmin.

--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] new to php/mysql

2003-01-31 Thread Janos Rusiczki
Most probably you have an error in your MySQL query or you are trying to 
fetch rows from the connection identifier.
But why don't you post the code which generated this error? How can we 
guess what's wrong in it elseway?

Sam wrote:

   Warning: mysql_fetch_row(): supplied argument is not a valid MySQL
result resource in C:\cn\test.php on line 24




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php