Jocelyn Fournier wrote:
>
> Hi,
>
> I wonder which of the following queries is faster :
>
> $result=mysql_query("SELECT lastauteur FROM forum ORDER BY date DESC LIMIT 1");
>
> or :
>
> $max=mysql_query("SELECT max(date) FROM forum");
> list($max)=mysql_fetch_row($max);
> $result=mysql_query("
Hi,
I wonder which of the following queries is faster :
$result=mysql_query("SELECT lastauteur FROM forum ORDER BY date DESC LIMIT 1");
or :
$max=mysql_query("SELECT max(date) FROM forum");
list($max)=mysql_fetch_row($max);
$result=mysql_query("SELECT lastauteur FROM forum WHERE date='max'");