Jump to content
php.lv forumi

problema ar datu izdoshanu


Braiens

Recommended Posts

ta ir kods:

 

<?php

$mysqli = mysql_connect("localhost", "****", "****");
mysql_select_db("****");
$c = "0";
if (mysql_error()) {
   printf("Savienojumā kļūda: %s\n", mysql_error());
   exit();
}
/*
Ja velies lai no lielaka uz mazako lieto shito rindinju :)
$result = mysql_query("SELECT * FROM `rekordi` GROUP BY punkti DESC Limit 100");
*/
$result = mysql_query("SELECT * FROM `rekordi` GROUP BY punkti ASC Limit 100");
while ($myrow = mysql_fetch_array($result))
{
$vards = $myrow['vards'];
$punkti = $myrow['punkti'];
$c++;
echo "
 <tr>
 <td>".$c."</td>
   <td>".$vards."</td>
   <td>".$punkti."</td>
 </tr>
\n\r";
}
mysql_close();
?>

 

Lieta tada ka ir paris vienadi ieraksti, bet vinsh nezkapec izdod tikkai 1, bet vajag lai izdod visus ierakstus ati sakita vienados...

Link to comment
Share on other sites

×
×
  • Create New...