|
Posted by Tom on 06/11/07 18:39
On Sun, 10 Jun 2007 22:12:00 -0400, Mr. Newt wrote...
>
>What is wrong with the below?
>
>$sql=mysql_query("INSERT INTO advertiser_tbl WHERE adv_id='7' (adv_name,
>cont_name)
>VALUES ('Peter', 'Griffin')");
>
>
The syntax for the INSERT and UPDATE SQL command are a bit different. An INSERT
is a new entry so there can't be a conditional clause at the end. The syntax for
that might be...
INSERT INTO advertiser_tbl (adv_name, cont_name)
VALUES ('Peter', 'Griffin')");
For an UPDATE you could use..
UPDATE advertiser_tbl
SET adv_name='Peter', cont_name='Griffin'
WHERE adv_id='7';
Tom
--
Basic Accounts $5.95 / month or $39.95 / 12 months
http://newsguy.com/overview.htm
Navigation:
[Reply to this message]
|