OK, I've got like a list of sites in my database. I'm selecting my sites and ordering them by hits DESC so that the sites that are most visited appear at the top.
Table: sites
Fields: siteid, siteurl, sitename, hits
Basically, instead of it displaying the actual site id, I want it to display the result id.
Like for example, say there was a site in my table "PHPBuilder"
It's values are:
siteid=1050
siteurl=http://www.phpbuilder.com
sitename=PHPBuilder.com
hits=7600
Then I had another one
siteid=1400
siteurl=http://www.somesite.com
sitename=random site
hits=7900
So the siteid of 1400 is clearly the most visited.
I want it to display as follows:
- random site (7900 hits)
- PHPBuilder.com (7600 hits)
So that instead of displaying the siteid, it's displaying the number of the result (and hence, the site that is in position 1, 2 etc.)
Can anyone please help?
Thankyou