I have to write a php
script to find the three biggest numbers of a column in a database table. This is my code so far, but it doesn't work .
<?php
$con=mysql_connect("localhost","root","");
$db=mysql_select_db("pool");
$res1=mysql_query("SELECT * FROM buy ORDER BY value LIMIT 3 ");
while($r1=mysql_fetch_array($res1)){
echo $r1['value'];
}
?>
Aucun commentaire:
Enregistrer un commentaire