Can I UPDATE 2 tables with 1 SQL statement?
| From: | Mark Gordon | Date: | Tue, 31 Jul 2001 02:55:42 +0000 |
| Subject: | Can I UPDATE 2 tables with 1 SQL statement? | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-10924@lists.php.net to get a copy of this message | ||
Heres what I'm trying to do:
$data=addslashes(fread(fopen($form_data, "rb"), filesize($form_data)));
//some lines of code edited out
$result = mysql_query ("
UPDATE bands, binary_data
SET genreid='$genre', bandname='$name', bandesc='$description',
bandurl='$url', bandemail='$email', bin_data='$data',
filename='$form_data_name', filesize= '$form_data_size',
filetype='$form_data_type'
WHERE bandname='$name' AND bands.bin_id=binary_data.bin_id
");
Thanks all you smart people.
=====
Mark
eyesyte@yahoo.com
__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/