The Arcive of vBulletin Modifications Site. |
|
help me smash this bug Details »»
|
|||||||||||||||||||||||||
Does anyone see anything wrong with this query? ::
Code:
$newforuminfo=$DB_site->query("SELECT forum.*,postthanks.* FROM forum LEFT JOIN postthanks ON (forum.forumid=postthanks.postthanksid) WHERE forumid='".$foruminfo[forumid]."'");
This is for a hack I'm making, so anyone who can help me out will get credit. Thanks. Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
|||
|
|||
|
btw, i've got a table called "postthanks" that i'm trying to join. that table contains a field called "message", which is what i'm trying to retrieve.
|
|
#3
|
||||
|
||||
|
don't use query if you want to work with the variable, you have to use query_first:
Code:
$newforuminfo=$DB_site->query_first("SELECT forum.*,postthanks.* FROM forum LEFT JOIN postthanks ON (forum.forumid=postthanks.postthanksid) WHERE forumid='".$foruminfo[forumid]."'");
|
|
#4
|
|||
|
|||
|
ah, thank you very much!
|
|
#5
|
|||
|
|||
|
i guess that wasn't the *only* problem. i'm going to call this a failed project before i have too much time invested.
|
|
#6
|
||||
|
||||
|
well it depends on where's the template read out.
if you use standartredirect with $newforuminfo[postthanks] it won't work, because $newforuminfo isn't a global var... am i right? if yes you have to open admin/functions.php find PHP Code:
|
|
#7
|
|||
|
|||
|
mmm! yes! i'm glad i didn't toss the readme file yet...i'm gonna re-apply this hack and try that. thanks.
|
|
#8
|
|||
|
|||
|
:/ still isn't cooperating. if it's not a huge deal, maybe i could send you the hack so you could take a look at the file edits and see what might be wrong. if it is, that's fine. i've pretty much given up anyway.
|
|
#9
|
||||
|
||||
|
no problem, send per pm, i'll see what i can do
|
|
#10
|
|||
|
|||
|
thanks
|
![]() |
|
|