mysql_result .. what am i doing wrong ?

From: Date: Wed, 06 Sep 2000 04:59:36 +0000
Subject: mysql_result .. what am i doing wrong ?
Groups: php.general 
Request: Send a blank email to php-general+get-15439@lists.php.net to get a copy of this message
I stole this from the check_date annotations but mysql_result always returns a 1, not the result of the select. Must be something really simple .. $r = mysql_db_query("mydatabase", "SELECT UNIX_TIMESTAMP('2000-6-12') as testdate"); if($d=mysql_result($r,0,'testdate') > 0) { $fname = mysql_field_name($r,0); <--test to verify field name echo "fname:" . $fname . "<br>"; echo "d:". $d . "<br>"; <--- always 1 echo date(" n F Y", $d) . "<br>"; } TIA, -pete petel@pdxeng.com

« previous php.general (#15439) next »