ok, I try to explain...
I'm writing a counter with the following two tables: logs, mpdl - where mpdl stores the hits of various url's or downloads:
CREATE TABLE mpdl (
type enum('mp','dl') DEFAULT 'mp' NOT NULL,
url varchar(255) NOT NULL,"
hits int(8) unsigned DEFAULT '0' NOT NULL,
since timestamp(8) NOT NULL,"
PRIMARY KEY (url)
);
to sort the table:
ALTER TABLE mpdl ORDER BY type,hits desc;
in my other table "logs" I store unique hits on my site with a column, that contains the entrypage - the url where the user has entered my site. To visualize this, I want to print different colored .gif's
All I need to do, when I show the results, is, to look for the entrypage (e.g. "/test.php") in the mpdl table and print the gif, e.g. 5.gif
got it?
hard to explain...
if there is no "clean" solution, tell me at least how to create a column with 1,2,3,4,... in it. it's not to identify records!
thanx
Philippo