PHP Pear DB - Importing an external LAGRE .sql file

From: Date: Thu, 31 Jul 2008 23:03:48 +0000
Subject: PHP Pear DB - Importing an external LAGRE .sql file
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-29118@lists.php.net to get a copy of this message
Hey Guys, I have tried to read a large (about 800kb) .sql file (INSERTs with lots of values) into a variable and then use that to populate the database with $res = $dbSocket->query($sql); (where $sql is the entire file) but I'm receiving DB errors. I have successfully imported the file as it is by using "mysql -u user -p database < backup.sql". I'm guessing it's one of: 1. The file is too large for DB to hand off to the database server 2. The file contrains \n which might cause DB to act all wacky 3. $dbSocket->query($sql); may not be the correct method of doing this I'm open to suggestions... any alternatives for doing that? Thanks. Regards, Liran.

« previous php.pear.general (#29118) next »