ChrisB: User pro server, mysql num rows oder $i++

Beitrag lesen

Hi,

$E = mysql_num_rows($SQL)

oder

$I=0;
while($VAR=mysql_fetch_assoc($SQL))
{
$I++;
}

echo $E.' oder '.$I;

Was ist schneller?

Wenn du ausschließlich die Anzahl Datensätze haben willst (und nicht ihren Inhalt) – dann COUNT().

MfG ChrisB

--
Autocomplete has spoiled me to a point where it happens every so often that I encounter a CAPTCHA, and I just type in the first character … and then wait for the rest of the code to be automatically suggested :/