Re: Is my syntax wrong?
| From: | 1LT John W. Holmes | Date: | Tue, 04 Feb 2003 16:08:43 +0000 |
| Subject: | Re: Is my syntax wrong? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-134286@lists.php.net to get a copy of this message | ||
>Something is still not right. Now I'm getting unexpected
>T_CONSTANT_ENCAPSED_STRING when using:
>
>$inc_current_ad = WrapMySQLDatabaseResults("macasap", "update ads where
>ad_id = ".$current_ad->Value("ad_id")." set
>rotate=".$current_ad->Value("rotate")+1."",
>"block=0","inc_current_ad");
The problem is your addition, you need another set of paranthesis around the
whole operation.
This will produce your same error:
$test = "the value is " . $c+1 . " dollars";
whereas this won't:
$test = "the value is " . ($c+1) . " dollars";
---John Holmes...