Re: UPDATE - MySQL - having some trouble

From: Date: Wed, 23 Jan 2002 16:05:39 +0000
Subject: Re: UPDATE - MySQL - having some trouble
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-81704@lists.php.net to get a copy of this message
$query = "update table set lastname=$lastname, firstname=$firstname where username=$username"; -> $query = "update <name_of_table> set lastname='$lastname', firstname='$firstname' where username='$username'"; U have to change the word table for the name of the table, and the ' if they are varchars. Logan "Phil Schwarzmann" <pschwar@jhmi.edu> escribió en el mensaje news:sc4e962d.087@cis27.hosts.jhmi.edu... > I can't the UPDATE command in MySQL to work properly. Here is my > query.... > > $query = "update table set lastname=$lastname, firstname=$firstname > where username=$username"; > > Anything wrong with my syntax here? > > >

« previous php.general (#81704) next »