
October 6th, 2003, 07:58 PM
|
|
Contributing User
|
|
Join Date: Jun 2003
Posts: 72
Time spent in forums: 11 m 36 sec
Reputation Power: 6
|
|
|
help with select max()
This isnt selecting the max downloaded file and i cant get max() to work in this script.
PHP Code:
<?
mysql_connect('localhost',*****,*****);
mysql_select_db(coldxice_forum);
$select_max_downloaded = "select * FROM csv_maps order by downloaded and mapid DESC LIMIT 1";
$mostdownloaded_result = mysql_query ($select_max_downloaded);
$mostdownloaded = mysql_result($mostdownloaded_result,0, "mapname");
$mostdownloadedcount = mysql_result($mostdownloaded_result,0, "downloaded");
$mostdownloaded_len = strlen($mostdownloaded) - 4;
$mostdownloaded_name = substr($mostdownloaded,0,$mostdownloaded_len);
?>
|