php-general | 2001092
Date: 09/20/01
- Next message: * R&zE:: "Re: [PHP] Print current page with no printer dialog box - How ?"
- Previous message: * R&zE:: "Re: [PHP] Problem: ereg doesn't work ok (?)."
- In reply to: ¼ ÁÖ¿: "[PHP] excuting several sql statements in one time"
- Next in thread: Steve Edberg: "[PHP] Re: excuting several sql statements in one time"
- Reply: Steve Edberg: "[PHP] Re: excuting several sql statements in one time"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
No you can't! I wrote a simple routine for the task!
you might want to view it from:
http://www.kameelah.org/eassoft/php_files/sql2php.php.txt
just take the parse_sql_stream($all) which returns an array that have all
the statments to be passed to mysql_query()
this script is usefull when you have a huge .SQL file that you want to
execute from PHP code.
"VM ÁÖ¿N" <seojuyung <email protected>> wrote in message
news:F152pgTFur2iz2Mb1s700003145 <email protected>
> Hello
>
> I want to know how to implement these several sql statements in one time.
>
> For example, I have 2 sql statements like :
>
> INSERT INTO com VALUES ('pentium');
> INSERT INTO com VALUES ('amd');
>
> Then, I want to excute these 2 sql statements in one time with PHP.
>
> I tried to implement like this :
>
> $query = "
> INSERT INTO com VALUES ('pentium');
> INSERT INTO com VALUES ('amd');
> ";
> mysql_query($query, $dbconnect);
>
> But as you know, it didn't work.
>
> Does any one know how to run this job?
>
> _________________________________________________________________
> MSN Explorer°¡ ÀÖÀ¸¸é Hotmail »ç¿ëÀÌ ÈξÀ Æí¸®ÇØ Áý´Ï´Ù. Áö±Ý
> http://explorer.msn.co.kr/ ¿¡¼ ¹«·á·Î ´Ù¿î·ÎµåÇϼ¼¿ä.
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: * R&zE:: "Re: [PHP] Print current page with no printer dialog box - How ?"
- Previous message: * R&zE:: "Re: [PHP] Problem: ereg doesn't work ok (?)."
- In reply to: ¼ ÁÖ¿: "[PHP] excuting several sql statements in one time"
- Next in thread: Steve Edberg: "[PHP] Re: excuting several sql statements in one time"
- Reply: Steve Edberg: "[PHP] Re: excuting several sql statements in one time"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

