Model 3 LR AWD Solid Black / Black / Aero / Trekhaak - Bestelling 2-10 Leaseplan, 4-10 Tesla, RN 22-09, Nieuwe RN 25-11, VIN Yes, leverdatum: ?/?/19(?)
Verwijderd
Volgens mij moet je de MAX function van SQL eens proberen. Kijk voor meer info op http://www.mysql.com
SELECT MAX(getal) AS getal FROM tablename where user = $user
SELECT MAX(getal) AS getal FROM tablename where user = $user
of als je ook nog gebruik wilt kunnen maken van de andere waardes dan kan je het volgende nemen :
SELECT * FROM [tabelnaam] WHERE gebruiker=$gebruiker ORDER BY getal DESC
SELECT * FROM [tabelnaam] WHERE gebruiker=$gebruiker ORDER BY getal DESC
Failed opening '/home/users/7942/signature.inc' for inclusion (include_path='.:') in /home/www/got/userstats.php on line 25
Bij deze regel zie ik alleen maar 1 username toch?Op donderdag 04 oktober 2001 10:08 schreef E-Vix het volgende:
SELECT * FROM [tabelnaam] WHERE gebruiker=$gebruiker ORDER BY getal DESC
Model 3 LR AWD Solid Black / Black / Aero / Trekhaak - Bestelling 2-10 Leaseplan, 4-10 Tesla, RN 22-09, Nieuwe RN 25-11, VIN Yes, leverdatum: ?/?/19(?)
Waarom gaat dit fout..../
<?php
/* link Ophalen uit de database */
$li = mysql_connect("hostname" , "username" , "password" );
$result = mysql_select_db("nfss", $li );
$result=mysql_query("SELECT name, MAX(toturen) AS toturen FROM nfsspc", $li );
(line 24)$total = mysql_num_rows($result);
(line 26)while ($row=mysql_fetch_array($result))
{
echo "<tr>";
echo " <td width='33%' height='5'>" . $row[username] . "</td>";
echo " <td width='33%' height='5'>" . $row[name] . "</td>";
echo " <td width='33%' height='5'>" . $row[toturen] . "</td>";
echo " <td width='33%' height='5'>" . $row[rang] . "</td>";
echo "</tr>";
echo "\n";
}
echo "</table>"
?>
krijg deze fout melding
Warning: Supplied argument is not a valid MySQL result resource in /var/www/html/nfsspc/get.php on line 24
Warning: Supplied argument is not a valid MySQL result resource in /var/www/html/nfsspc/get.php on line 26
<?php
/* link Ophalen uit de database */
$li = mysql_connect("hostname" , "username" , "password" );
$result = mysql_select_db("nfss", $li );
$result=mysql_query("SELECT name, MAX(toturen) AS toturen FROM nfsspc", $li );
(line 24)$total = mysql_num_rows($result);
(line 26)while ($row=mysql_fetch_array($result))
{
echo "<tr>";
echo " <td width='33%' height='5'>" . $row[username] . "</td>";
echo " <td width='33%' height='5'>" . $row[name] . "</td>";
echo " <td width='33%' height='5'>" . $row[toturen] . "</td>";
echo " <td width='33%' height='5'>" . $row[rang] . "</td>";
echo "</tr>";
echo "\n";
}
echo "</table>"
?>
krijg deze fout melding
Warning: Supplied argument is not a valid MySQL result resource in /var/www/html/nfsspc/get.php on line 24
Warning: Supplied argument is not a valid MySQL result resource in /var/www/html/nfsspc/get.php on line 26
Model 3 LR AWD Solid Black / Black / Aero / Trekhaak - Bestelling 2-10 Leaseplan, 4-10 Tesla, RN 22-09, Nieuwe RN 25-11, VIN Yes, leverdatum: ?/?/19(?)