|
Posted by Robert on 06/11/07 21:42
Tom wrote:
> 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
Thank you. =)
Navigation:
[Reply to this message]
|