Sadly, I don't have any answers, only more questions. First, how do you know your query is returning a FALSE result? What test are you performing and what are the results of the test? Second, what type of column is fee_recd? I've been toying with the MAX() function on the command line with a number of my own tables using different column types (DATE, TEXT, VARCHAR, INT) and have yet to see it fail to return some sort of result set. Rich > -----Original Message----- > From: boclair@xxxxxxxxxxx [mailto:boclair@xxxxxxxxxxx] > Sent: Tuesday, July 13, 2004 8:57 AM > To: php-db@xxxxxxxxxxxxx > Subject: Getting a result from MAX() query > > > Would somebody be kind enough to explain why this query > produces a false result > > $latest=mysql_query("SELECT MAX(fee_recd) FROM > members",$connectup)or die > ("Query failed:<br>$latest<br>Error: " . mysql_error()); > > but this one doesn't > > $latest=mysql_query("SELECT fee_recd FROM members ORDER BY > fee_recd DESC > LIMIT 1",$connectup)or die ("Query failed:<br>$latest<br>Error: " . > mysql_error()); > > Louise > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php