Re: Mucking about with Variables
| From: | Rasmus Lerdorf | Date: | Thu, 03 Aug 2000 16:51:58 +0000 |
| Subject: | Re: Mucking about with Variables | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-9979@lists.php.net to get a copy of this message | ||
> 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??
echo $query
and paste the result into the mysql command line tool and see if it
works. I bet $ticket_id is invalid.
-Rasmus