|
Posted by peter on 04/07/07 04:12
> I must be tired. I accidentally replied to Zeldor instead of the NG.
> Sorry Zeldor.
>
> Any way, I've tried replacing = with .= and it still doesn't work. I've
> tried every
> variation I can come up with and no joy. Another hint?
As Zeldor pointed out you must use .= otherwise the second query would
overwrite the first query in the variable. Also even if you did it correctly
the sql would be:-
INSERT INTO advertiser_info_tbl (adv_name) values ('$adv_name')INSERT INTO
address_info_tbl (address, apt, city, state, zip) values ('$address','$apt',
'$city', '$state', '$zip')
But obviously with the variables replaced. In this example how does mysql
know this is 2 statements? In fact it does not you should terminate a
statement with a ;.
1 other problem however if I remember correctly mysql_query can only handle
1 query at a time if you try more than 1 it will fail. I beleive
mysqli_query can handle 2 however.
Navigation:
[Reply to this message]
|