On Wednesday, February 11, 2004, at 03:29 PM, Keith Warren wrote:
I want to be able to track how many times any particular record is returned from a search, and I have two ideas about how to do this. But because I have little experience with MySQL, I may be totally off > base.
This database is served on the web via Lasso.
Idea 1. Create an integer field in the table that contains the records I want to track, and increment this field each time the data is displayed.
not very extensible
Idea 2. Create a new table and create a new record in this table each time the record that I want to track is accessed.
not a bad start, but on a high traffic site, you could get a huge amount of data very quickly.
Idea 3. Create a table with two columns, the id of the record, and an integer column for the hits... update hits=(hits+1) if found, else create a new entry with the id and 1 hit.
Idea 4. You may want to extend this further to include years, months and even days, to generate more meaningful counters.
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]