Re: PHP Pear DB - Importing an external LAGRE .sql file

From: Date: Fri, 01 Aug 2008 21:47:30 +0000
Subject: Re: PHP Pear DB - Importing an external LAGRE .sql file
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-29125@lists.php.net to get a copy of this message
I'm not sure but I think the error is that PEAR DB can't handle multiple inserts or is it the database server (I'm using MySQL) that can't handle it but in any case I have split my INSERTs using a known suffix and then I use a loop to go over all the possible INSERTs and perform this. Regarding the actual errors I received when trying to multiple INSERTs - the error wasn't anything logical, it just said an SQL syntax error. To see if I'm correct and this affects PEAR DB you can easily check by running: $dbSocket->query("INSERT INTO table (a,b,c) VALUES ('a','b','c');INSERT INTO table (a,b,c) VALUES ('a','b','c');"); This doesn't work for me so... Regards, Liran. On Fri, Aug 1, 2008 at 5:27 PM, Mike D'Ambrogia <miked@jamagination.com>wrote: > On 8/1/2008 8:20 AM, Mike D'Ambrogia wrote: > >> INSERT INTO /|tbl_name|/ (a,b,c) VALUES(1,2,3),(4,5,6),(7,8,9); >> > those were supposed to be quotes... would have stripped them if I'da known > that they would have ended up looking like that! > > should be: > INSERT INTO tbl_name (a,b,c) VALUES(1,2,3),(4,5,6),(7,8,9); > > > -- > PEAR General Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

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