hey all,
you see i have this script..
while writing this i had in mind that it will get the name of the record with the highest number of downloads.....
but you see i have 3 test records in the table :
1 , 2 , 3 :
1 has the value 6
2 has the value 7
3 has the value 14
i put these values for testing purposes....
for as long as the digits are in a single figure... it works fine... but when it goes into 2 figures the script the script only considers the first digit....
so like if i do by "ASC" i get record 3.... and viceversa.... so any thing that im puttin in wrong???
oh oh....... one more thing....
how can i show total number of downloads.... like if the 3 records values in the "downloaded_times" add up to 27.... how can i get it to show this value......
thnx !!!
you see i have this script..
| Code: |
| $mostdownloadedsql = mysql_query("SELECT * FROM templates ORDER BY 'downloaded_times' DESC LIMIT 1") or die (mysql_error());
while ($mostdownloaded = mysql_fetch_array($mostdownloadedsql)) { echo $mostdownloaded['name']; } |
while writing this i had in mind that it will get the name of the record with the highest number of downloads.....
but you see i have 3 test records in the table :
1 , 2 , 3 :
1 has the value 6
2 has the value 7
3 has the value 14
i put these values for testing purposes....
for as long as the digits are in a single figure... it works fine... but when it goes into 2 figures the script the script only considers the first digit....
so like if i do by "ASC" i get record 3.... and viceversa.... so any thing that im puttin in wrong???
oh oh....... one more thing....
how can i show total number of downloads.... like if the 3 records values in the "downloaded_times" add up to 27.... how can i get it to show this value......
thnx !!!
