Je moet ingelogd zijn om te stemmen.
SELECT max(maand) FROM tabel
<?php $max = "SELECT max(maand) FROM stats WHERE naam = '".$naam."'"; $maxres = mysql_query($max); $maxaant = mysql_num_rows($maxres); echo $maxaant; ?>
<?php$max = "SELECT max(maand) FROM stats WHERE naam = '".$naam."'";$maxres = mysql_query($max);$maxaant = mysql_num_rows($maxres);echo $maxaant;?>
<?php $query = 'SELECT COUNT(maand) AS max_maand FROM stats ORDER BY max_maand DESC LIMIT 1'; $result = mysql_query ($query); if (!$result) { // handel fout af } else { $max = mysql_result ($result, 0); } ?>
<?php$query = 'SELECT COUNT(maand) AS max_maand FROM stats ORDER BY max_maand DESC LIMIT 1';$result = mysql_query ($query);if (!$result){ // handel fout af}else{ $max = mysql_result ($result, 0);}?>