Re: MySQL problem - stumped

From: Date: Sat, 10 Mar 2001 19:09:13 +0000
Subject: Re: MySQL problem - stumped
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-43328@lists.php.net to get a copy of this message
At 01:58 PM 3/10/01 -0500, John Vanderbeck wrote: You are using && in your statement ... should be "AND" .
The following code is giving an me problems, I can't figure it out to save my soul. The last line gives: Here is the code: $link = db_connect(); $query = "UPDATE Users SET firstname='$firstname', lastname='$lastname' WHERE username='$user' && password='$password'"; $result = mysql_query($query, $link); $err = mysql_error(); echo "Errors:".$err; $rows = mysql_affected_rows($result); And here is the output: Errors: Warning: Supplied argument is not a valid MySQL-Link resource in /****/*****/****/**********.********.***/db.php on line 147 Line 147, is the last line in the above snippet. I cleared out the path name for security, no offense intended :) Now, I KNOW that the db_connect() function is not the problem, as I use it in many other places in this script with no errors. What am I missing? - John Vanderbeck - Admin, GameDesign -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net
########################################################## # Rick St Jean, # rstjean@internet.look.ca # President of Design Shark, # http://www.designshark.com/ # Quick Contact: http://www.designshark.com/messaging.ihtml # Tel: 905-684-2952 ##########################################################

« previous php.general (#43328) next »