Re: Running entire file with PEAR::DB

From: Date: Tue, 06 Apr 2004 16:44:41 +0000
Subject: Re: Running entire file with PEAR::DB
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-11673@lists.php.net to get a copy of this message
Nikhil G. Daddikar wrote:
I have a file consisting of lot of sql statements. I want to use PEAR::DB to run that script however, I keep on getting "syntax error". Looks like DB::query() doesnt like multiple sql statements in one file. Any ideas on how to do it? Thanks.
The DB backend you're using probably doesn't support multiple SQL statements. Just explode the file on \n or ; (depending on that kind of data you have) and run each query manually. -- paperCrane <Justin Patrin>

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