RE: UPDATE syntax

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm a beginner at PHP and MySql but a long time MS SQL server user.

Maybe it should be `advertisements`.`displayed` instead?

I just did a test and my Query browser doesn't like `interestcodes.id` but likes `interestcodes`.`id`.  Notice the quotes
(accents) on each side to the period.

Gary

> -----Original Message-----
> From: Ron Piggott [mailto:ron.php@xxxxxxxxxxxxxxxxxx]
> Sent: Thu, December 13, 2007 7:20 PM
> To: php-db@xxxxxxxxxxxxx
> Subject:  UPDATE syntax
>
>
> Can anyone see something wrong with this syntax?
>
> UPDATE `advertisements` INNER JOIN `advertisements_rate_plans` ON
> `advertisements.rate_plan` = `advertisements_rate_plans.reference` SET
> `advertisements.displayed` = 0 WHERE `advertisements.start_date` <=
> '2007-12-13' AND `advertisements.end_date` >= '2007-12-13' AND
> `advertisements.approved` =1 AND `advertisements.paid` =1 AND
> `advertisements.displayed` =1 AND `advertisements_rate_plans.type` =2
>
> I am getting this error message:
>
> #1054 - Unknown column 'advertisements.displayed' in 'field list'
>
> There is a column called "displayed" in table "advertisements".
>
> I am on the
> http://dev.mysql.com/doc/refman/5.0/en/update.html page and
> I am missing something.
>
> Ron
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux