Re: UPDATE mysql

From: Date: Mon, 24 Jun 2002 05:03:17 +0000
Subject: Re: UPDATE mysql
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-103534@lists.php.net to get a copy of this message
In article <sd148e91.085@cis27.hosts.jhmi.edu>, pschwar@jhmi.edu says... > I can't get UPDATE to work properly when querying MySQL. > > $query = "UPDATE $table SET field1='$var1' WHERE id='$id'"; > > I want to update one field of one row in a table. Is this syntax > correct? > if id is an int type, no. You only need to quote values being passed to [var]char or text type fields. -- David Robley Temporary Kiwi! Quod subigo farinam

« previous php.general (#103534) next »