Quote:
Originally Posted by Dr.CustUmz
without the limit 1 it erases every entry of that that thread id
|
Is that not what you are trying to do ?
I guess I dont understand your actual objective then.
Quote:
Originally Posted by Dr.CustUmz
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.
|
A delete query cannot add anything, ever.
You are using shutdown queries, which quite possibly get run backwards to how you define them (there isnt any guarantee what order they will run). So more likely the delete is running first, then the insert. You wont notice this if there is at least one existing record, but you will if there are none.