Quote:
Originally Posted by Paul M
The original code will throw a database error, you just wont see it because its being run as a shutdown query.
You final code is fine, but you dont actually need the LIMIT 1.
|
without the limit 1 it erases every entry of that that thread id
thread views table looks like
Code:
8
8
8
8
3
1
6
8
8
8
if i remove limit 1 and view thread 8, all of its instances get removed and when the cron runs to update thread view its not accurate.
update****
the problem with the method im using
Code:
$vbulletin->db->query_write("
DELETE FROM " . TABLE_PREFIX . "threadviews
WHERE threadid = $threadinfo[threadid]
LIMIT 1
");
is if there is no row with that threadID in the threadviews table it adds the original view to the table.