Re: MDB2 and SQL script
| From: | Lukas Kahwe Smith | Date: | Mon, 20 Nov 2006 06:30:41 +0000 |
| Subject: | Re: MDB2 and SQL script | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-25879@lists.php.net to get a copy of this message | ||
Tim Denby wrote:
Hello all, I'm writing a PHP script that will install my application. I have a SQL script as a file (for creating the DB) and I want to execute the whole thing from PHP. But I can't seem to find anything that will execute multiple SQL instructions at once. Do I need to parse the file into individual instructions on my own and loop through them, or is there something in MDB2 (or elsewhere) that would do this for me?Some drivers have support for the "multi_query" option (like mysqli and a few others). When you enable that you can pass it multiple queries in one string. regards, Lukas