RE: [PHP] R: [PHP] SQL Query Not Kosher?
| From: | Ford, Mike [LSS] | Date: | Wed, 04 Feb 2004 13:00:31 +0000 |
| Subject: | RE: [PHP] R: [PHP] SQL Query Not Kosher? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-176785@lists.php.net to get a copy of this message | ||
On 03 February 2004 13:45, Alessandro Vitale contributed these pearls of
wisdom:
> try removing curly braces as follows:
>
> $query = mysql_query("UPDATE stories SET status='approved'
> WHERE story_id={$id}"); |
Nothing wrong with the above, it's perfectly valid -- just a slightly
different way of writing:
> $query = mysql_query("UPDATE stories SET status='approved'
> WHERE story_id=${id}");
Cheers!
Mike
--
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford@leedsmet.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211