How can you count calls to a record in MySql?
I have a database of articles. I am not an expert on this stuff, but I want to know: (in PHP/MySQL)
1. Each time an article is called from MySQL database it increments a counter in that DB row.
Is there a built in function or something? All I can think of is to somehow "UPDATE articles" to add '1' to the COUNT field each time the article is displayed.
All I need is a counter (of views) for each row in the Articles database.
Does this make sense?
Last edited by Chad J; Oct 29, 2002 at 10:41.
Nevermind - I got it. My brain just froze up.
Made a count field on the articles db - default 0.
Then make this SQL statement
mysql_query("UPDATE article SET count = count+1 WHERE rid=xxx");