Not sure how to start. I have a query that states,
Code:
$q = vB::$db->query_first("SELECT `thisdata`,`thisdata2` FROM `customtable` WHERE `threadid` = " . $threadid . ");
i then register it properly
Code:
vB_Template::preRegister('threadbit', array('q' => $q));
blah blah register
what hook should I use? threadbit_display?
how would I call the variable properly?
I've tried a number of things... :\
Code:
{vb:raw q.thisdata} {vb:raw thisdata} {vb:raw q} {vb:raw q, {vb:raw thread.realthreadid}} {vb:raw q.{vb:raw thread.realthreadid}.thisdata} {vb:raw q.thisdata, {vb:raw thread.realthreadid}} {vb:raw thread.q.thisdata}
I am unsure if my query is called once, or looped for each thread.id once or how to reference it in the threadbit template so it only prints the data for that threads "id".
any ideas? A few of those variables returned "Array" in the template, but I was unsure if it was an array of all threads or just the data that pertains to that specific thread.
--------------- Added [DATE]1360699547[/DATE] at [TIME]1360699547[/TIME] ---------------
nvm, figured it out. issue with query.