Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 DEV-Group
 DEV Discussions (General)
 Not showing read counts after upgrade to MySQL
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

paarlberg
New Member

74 Posts

Posted - 31 October 2002 :  21:14:08  Show Profile  Visit paarlberg's Homepage
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
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.17 seconds. Powered By: Snitz Forums 2000 Version 3.4.07