Re: How to run .sql files using php
| From: | Ahmed Saad | Date: | Thu, 14 Jul 2005 12:55:03 +0000 |
| Subject: | Re: How to run .sql files using php | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-218678@lists.php.net to get a copy of this message | ||
hi babu
On 7/13/05, babu <garavindbabu@yahoo.co.uk> wrote:
> i have a set of queries which i have placed them in one .sql file.i want to run this file using
> php's mssql and oracle(oci) functions.
you need a database abstraction layer to help you with that (adodb for example)
function fireSQL( $driver )
{
// establish the connection to the database using the specified driver
// read SQL from the file (probably tokenizing it into sql statements)
// feed the sql into the connection
}
-ahmed