The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
[HELP] Removing row from table plugin query
so ive got my plugin at showthread_complete, its working pretty good =)
but im trying to add a query to it that reverses something done in showthread.php This is the code straight from showthread.php Code:
$db->shutdown_query(" INSERT INTO " . TABLE_PREFIX . "threadviews (threadid) VALUES (" . intval($threadinfo['threadid']) . ')' ); Code:
$db->shutdown_query(" DELETE FROM " . TABLE_PREFIX . "threadviews (threadid) VALUES (" . intval($threadinfo['threadid']) . ')' ); i have also tried Code:
$vbulletin->db->query Code:
$db->query The goal: if vb options are not set to update view counts immediately, each view is stored in the threadviews table. this happens with that first block of code from showthread.php so when you view a thread that query runs, i want my query to just delete the row that first query added. i have got this all worked out if admins update threads immediately, but i don't want to dictate their having to choose that option. --------------- Added [DATE]1457655461[/DATE] at [TIME]1457655461[/TIME] --------------- this is working Code:
$vbulletin->db->query_first(" DELETE FROM " . TABLE_PREFIX . "threadviews WHERE threadid = $threadinfo[threadid] LIMIT 1 "); |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|