RE: [PHP] MySQL data

From: Date: Wed, 18 Apr 2001 02:23:57 +0000
Subject: RE: [PHP] MySQL data
Groups: php.general 
Request: Send a blank email to php-general+get-49108@lists.php.net to get a copy of this message
#3 is the easiest... from command line: # mysqldump -uroot db_from > db.sql # mysql -uroot db_to < db.sql Now, the entire database was copied. This is the easiest way for the whole database. With single table it is quite similar. Also if the table in db_to already exists, then it might make more sense a loop in PHP to reinsert the staff under your own conditions. Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) maxim@phpbeginner.com www.phpbeginner.com -----Original Message----- From: Joe Stump [mailto:joe@joestump.org] Sent: Wednesday, April 18, 2001 10:48 AM To: Augusto Cesar Castoldi Cc: php-general@lists.php.net Subject: Re: [PHP] MySQL data There are a few ways to do this... 1.) Copy the binary files over in the mysql data directory ... have to be root and normally at a shell. 2.) SELECT * FROM table and then while() you have rows INSERT INTO other_table those values 3.) mysqldump can be used via PHP and used by most users ... hope this helps ... --Joe On Tue, Apr 17, 2001 at 09:05:02PM -0300, Augusto Cesar Castoldi wrote: > This question has not much with PHP, but I work with PHP... > > Can I get the data from a table in MySQL and copy/transfer all data to > other database to a table with the same name? > > regards, > > Augusto Cesar Castoldi > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net /* Joe Stump * Sr. PHP Developer * http://www.Care2.com http://www.joestump.net http://gtk.php-coder.net */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#49108) next »