paarlberg
New Member

74 Posts |
Posted - 31 October 2002 : 21:14:08
|
UPDATE FORUM_TOPICS SET T_VIEW_COUNT = (T_VIEW_COUNT + 1) WHERE (TOPIC_ID = 308)
There's your culprit.
It should not have the brackets in the query.
What happens, is that the database is designed to allow NULL values in the counters, so when a new topic is created, is has NOTHING as a value for the counter.
When the counter is incremented, ACCESS will default the NULL value to a 0, MySQL does NOT.
We've altered the database, and changed the table to default to a 0 value. When a new topic is created, the read counter defaults to 0, and therefore, 0+1 = 1, hence, the counters work
|
|