Quote:
Originally Posted by DragonBlade
Okays, seems I made a spelling error AND added in an un-needed comma. XP
I tested this out on my forum and it works.
PLUGIN #1:
PHP Code:
// Query to check if/what threadowner's marital status is
$marital_status_threadids = array();
$marital_status_threads_query = sprintf("SELECT thread.threadid, userfield.field17 AS maritalstatus FROM thread LEFT JOIN userfield ON(thread.postuserid=userfield.userid) WHERE thread.threadid IN (0%s)", $ids);
$marital_status_threads_result = $vbulletin->db->query_read($marital_status_threads_query);
while ($marital_status_threads_row = $vbulletin->db->fetch_array($marital_status_threads_result))
{$marital_status_threadids[$marital_status_threads_row['threadid']] = $marital_status_threads_row['maritalstatus'];}
NOTE: The "," in the "WHERE thread.threadid IN" statement is now omitted.
NOTE2: I spelled "status" as "statis" in one variable. XD Oopsie.
See how that works out for ya.
|
For Marital Status Thread Display this right?
Code:
$thread['postusername'] .= $marital_status_threadids[$thread['threadid']];
For Marital Status Thread Query, this?
Code:
($hook = vBulletinHook::fetch_hook('forumdisplay_query')) ? eval($hook) : false;
// Query to check if/what threadowner's marital status is
$marital_status_threadids = array();
$marital_status_threads_query = sprintf("SELECT thread.threadid, userfield.field17 AS maritalstatus FROM thread LEFT JOIN userfield ON(thread.postuserid=userfield.userid) WHERE thread.threadid IN (0%s)", $ids);
$marital_status_threads_result = $vbulletin->db->query_read($marital_status_threads_query);
while ($marital_status_threads_row = $vbulletin->db->fetch_array($marital_status_threads_result))
{$marital_status_threadids[$marital_status_threads_row['threadid']] = $marital_status_threads_row['maritalstatus'];}
I'm still getting the big error.