On 22 Mar 2002 at 16:41, Ashley M. Kirchner wrote: > Rick Emery wrote: > The query does get executed, and the record does get changed. > > The code looks like this: > > $conn = @MYSQL_CONNECT($host,$user,$password) ; > mysql_select_db($database, $conn); > $query = "UPDATE clients SET email_flag='0' WHERE > MD5(concat(email_address,'$key'))='$uniqueID' "; > $result = mysql_query($query, $conn); > $num_rows = mysql_num_rows($result); > echo "$num_rows Rows\n";
seems there is something wrong with the query, can you either echo the query and feed it directly to mysql, (e.g. in phpmyadmin) see what happens? also, i always do queries like this: $result=mysql_query($query) or die ('<H1><font color=red>Bad database request setting email flag </font></H2> in :' .__FILE__ .' line '.__LINE__ .'<br /><b>The query used was:</b> '.$query .'<br /><b>MySQL says</b> '.mysql_error() ); I find it is extremely useful in debugging. -- ! please check my email address ! ! only my email [EMAIL PROTECTED] works ! ! email [EMAIL PROTECTED] is a black hole since januari 2002 ! Chris Hayes - Droef 35 - Wageningen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php