Re: Re: UPDATE table problem

From: Date: Wed, 17 Oct 2001 17:10:10 +0000
Subject: Re: Re: UPDATE table problem
References: 1 2 3  Groups: php.db 
Request: Send a blank email to php-db+get-13429@lists.php.net to get a copy of this message
I don't get one thing whats 3D? and my create table was that not my update! my update was quiet different but i'll find it and post is ASAP Thomas "Dl Neil" <PHPml@DandE.HomeChoice.co.uk> wrote in message news:013401c15674$d0ff4570$c014100a@jrbrown... > I'm tired, lost, or otherwise: your db is set up as:- > my create table was this CREATE TABLE(name > > varchar(128), passwd varchar(128)); > then you run the following query against it: > $update_query =3D "update guestbook set last_access=3Dnow() where = guest_id=3D'$result'"; > Please explain, > =dn > > > ----- Original Message ----- > From: "Thomas "omega" Henning" <tomi@mediasoft.ro> > To: <php-db@lists.php.net> > Sent: 16 October 2001 19:42 > Subject: Re: [PHP-DB] Re: UPDATE table problem > > > > affected rows() sed nothing 0 my create table was this CREATE TABLE(name > > varchar(128), passwd varchar(128)); > > and i need 2 update name and passwd at the same time! and my mysql shel it > > went perfectly!!! > > > > Thomas > > > > "Rick Emery" <remery@excel.com> wrote in message > > > > news:EAA093B474ABD311A71E00508B5FE08305C2CAA5@adntex03.us.excel.com... > > > Are you using George's code? Or something different? > > > > > > -----Original Message----- > > > From: Thomas "omega" Henning [mailto:tomi@mediasoft.ro] > > > Sent: Tuesday, October 16, 2001 7:19 AM > > > To: php-db@lists.php.net > > > Subject: [PHP-DB] Re: UPDATE table problem > > > > > > > > > This puts up my question!! > > > When i tryed to update my table from my program it didn't do anything no > > > error nothing. When i tryed the same code in the mysql shell it worked > > > perfectly > > > > > > Any idias why?? > > > > > > Thomas > > > > > > "George Lioumis" <glioumis@adacom.com> wrote in message > > > news:009a01c1557d$ad29b830$05041fac@adacom.com... > > > Hi, everyone, again, > > > > > > Consider the following piece of code: > > > ------------------------- > > > $update_query =3D "update guestbook set last_access=3Dnow() where = > > > guest_id=3D'$result'"; > > > $update_query =3D stripslashes($update_query); > > > echo $update_query; > > > echo "<BR><BR>"; > > > $updated =3D mysql_query($update_query) or die(mysql_error()); > > > if ($updated) > > > { > > > .............etc etc > > > } > > > -------------------------- > > > When ran, it returns: > > > update guestbook set last_access=3Dnow() where guest_id=3D'Resource = > > > id#2' > > > > > > The problem is that if($updated) returns TRUE, but the last_access field = > > > is not updated at all !!! :((( > > > Any ideas as far as the $update_query is concerned??? > > > > > > George > > > > > > > > > > > > > > > > > > -- > > > PHP Database Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > > > For additional commands, e-mail: php-db-help@lists.php.net > > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > > > > > > > -- > > PHP Database Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > > For additional commands, e-mail: php-db-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > >

« previous php.db (#13429) next »