Re: Is my syntax wrong?
| From: | Brian Dunning | Date: | Wed, 05 Feb 2003 15:00:32 +0000 |
| Subject: | Re: Is my syntax wrong? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-134421@lists.php.net to get a copy of this message | ||
On Tuesday, February 4, 2003, at 05:03 PM, John W. Holmes wrote:
Yes it is.I think we are almost there. This code is not producing an error, but it is also not incrementing the database. The value stays at zero. Any idea what could be wrong? $inc_current_ad = WrapMySQLDatabaseResults("macasap", "update adswheread_id = ".$current_ad->Value("ad_id")." set rotate=".($current_ad->Value("rotate")+1),"block=0","inc_current_ad"); Are you sure $current_ad->Value("rotate") is returning a value?
If you're just trying to increment "rotate" by one, then you can use Update ... set rotate = rotate + 1 where ...Could you give me the full SQL statement?