Re: Mucking about with Variables
| From: | Robin Vickery | Date: | Thu, 03 Aug 2000 17:09:17 +0000 |
| Subject: | Re: Mucking about with Variables | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-9984@lists.php.net to get a copy of this message | ||
callen@driver8.org (callen) writes:
> Greetings:
>
> I am mucking around here a bit, and not geting anywhere, here's the
> situation
>
> $query= "UPDATE ticketing SET $var = $var where ticket_number =
> '$ticket_id' ";
>
> This statemnet gets passed fine into mysql with no errors, but
> unfortuantely no data is inserted
> into the DB. When I quote $var, I get syntax errors, so....
>
> Whats wrong with this statement??
It doesn't look like anything's wrong with it, but as it's replacing
a value with the same value you won't actually see any change.
Unless I'm missing something.
-robin
--
Robin Vickery...............................................
Planet-Three, 3A West Point, Warple Way, London, W3 0RG, UK
Email: robin@planet-three.net Phone: +44 (0)794 670 6395