Re: Running entire file with PEAR::DB
| From: | Leon Derczynski | Date: | Tue, 06 Apr 2004 13:59:14 +0000 |
| Subject: | Re: Running entire file with PEAR::DB | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-11665@lists.php.net to get a copy of this message | ||
I've had problems with getting query() to execute multiple statements too!
Try using:
$queries = file('queries.sql');
foreach ($queries as $query) {
$db->query($query);
}
On Tue, 06 Apr 2004 19:20:28 +0530, Nikhil G. Daddikar <ngd@celoxis.com> 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.-- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/