Justtechjobs.com Find a programming school near you






Online Campus Both


php3-list | 199908

RE: [PHP3] Insert into multiple tables From: almir kazazic (a9409754 <email protected>)
Date: 08/29/99

make it so
sql="update table1 set bla=blabla, ....";
$result = mysql_query($sql);
sql="update table2 set .................";
$result = mysql_query($sql);

-----Original Message-----

From: Geocrawler.com [mailto:archiver <email protected>]
Sent: Sonntag, 29. August 1999 13:17
To: php3 <email protected>
Subject: [PHP3] Insert into multiple tables

This message was sent from Geocrawler.com by "Joost Soeterbroek"
<joost <email protected>>
Be sure to reply to that address.

Newbie question:

With PHP/MySQL I am trying to INSERT and/or UPDATE into multiple tables at
one time. What is the syntax?

I thought I would use this syntax:
update table1,table2
set table1.field1='value',
table2.field1='value'
where table1.uid='1000000001'
and table1.pid=table2.pid;

but this syntax doesn't work.

Geocrawler.com - The Knowledge Archive

--
PHP 3 Mailing List <http://www.php.net/>
To unsubscribe, send an empty message to php3-unsubscribe <email protected>
To subscribe to the digest, e-mail: php3-digest-subscribe <email protected>
To search the mailing list archive, go to:
http://www.php.net/mailsearch.php3
To contact the list administrators, e-mail: php-list-admin <email protected>

-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribe <email protected> To subscribe to the digest, e-mail: php3-digest-subscribe <email protected> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-admin <email protected>