Re: function MAX with WHERE

From: Date: Mon, 25 Jul 2005 09:04:38 +0000
Subject: Re: function MAX with WHERE
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-219288@lists.php.net to get a copy of this message
What print_r($test_m) say ? Or echo mysql_num_rows($test); May be you get 0 records from your query. On Monday 25 July 2005 09:06, Jesús Alain Rodríguez Santos wrote: > I have someting like this: > > $test = mysql_query("SELECT MAX(dato) AS datos FROM tabla WHERE campo_mes > = '$mes'"); > $test_m = mysql_fetch_array($test); > $test_mes = $test_m['datos']; > > print $test_mes > > where $mes is a value > I need to know if something its wrong, because I don't recive any error, > but I see nothing > > > > > -- > Este mensaje ha sido analizado por MailScanner > en busca de virus y otros contenidos peligrosos, > y se considera que está limpio. -- Regards Georgi Ivanov

« previous php.general (#219288) next »