Computers |
|
| | #1 (permalink) |
| Newb Techie Join Date: Dec 2005
Posts: 33
| I have a script for simple stat logging that i wrote. The only issue I have is seen in a few ways, the easiest to explain is as follows: It will graph top five most used browsers on the site. However, if only three browsers are in the mysql table ($querystats="SELECT *,count(*) as hits FROM `statistics` group by browser order by hits desc limit 5" , I get an error: Warning: mysql_result() [function.mysql-result]: Unable to jump to row 3 on MySQL result index 4 in /roottofile/file.inc on line 8 Warning: mysql_result() [function.mysql-result]: Unable to jump to row 4 on MySQL result index 4 in /roottofile/file.inc on line 9 Warning: mysql_result() [function.mysql-result]: Unable to jump to row 3 on MySQL result index 4 in /roottofile/file.inc on line 39 Warning: mysql_result() [function.mysql-result]: Unable to jump to row 4 on MySQL result index 4 in /roottofile/file.inc on line 40 What can I put into the mysql command or php script to basically say "hey, if only three rows (or results) are returned, dont error out, just give me what you got and forget about the rest"? |
| | |