You are here: Re: [PHP] How to run .sql files using php « PHP « IT news, forums, messages
Re: [PHP] How to run .sql files using php

Posted by Raffael Wannenmacher on 07/14/05 13:06

or execute a shell command

$ret = `mysql -u[user] -p[password] -h[host] [db_name] < file.sql`;

glumtail wrote:
> I think it's better to split the SQL into pieces
> line 1: create table ....
> line 2: insert into .....
> $sql = 'create table....'
> $sql = 'insert into ...'
>
> 2005/7/13, Shaw, Chris - Accenture <cshaw@revenue.ie>:
>
>>
>>Can you use mysqli_multi_query for mysql in php5?
>>
>>hth
>>
>>-----Original Message-----
>>From: babu [mailto:garavindbabu@yahoo.co.uk]
>>Sent: 13 July 2005 16:39
>>To: php-general@lists.php.net
>>Subject: [PHP] How to run .sql files using php
>>
>>
>>Hi ,
>>
>>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.
>>any idea pls.
>>
>>thanks.
>>babu
>>
>>
>>
>>---------------------------------
>>How much free photo storage do you get? Store your holiday snaps for FREE
>>with Yahoo! Photos. Get Yahoo! Photos
>>
>>
>>************************
>>
>>This message has been delivered to the Internet by the Revenue Internet
>>e-mail service
>>
>>*************************
>>
>>--
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация