Results 1 to 2 of 2
Thread: Times Viewed
May 18, 2003, 14:20 #1
i read kevin's book (1st edition)... and i liked the idea that by adding a column in my MySQL table i can know how many ppl read the articles on the site. so i copied the code below:
$viewed = @mysql_query("UPDATE news SET viewed=viewed+1 WHERE id=$id;");
May 18, 2003, 16:13 #2
Timestamp columns are for when the row was last updated. Not for other purposes.
You need to use a proper column type for your posting date.