The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
MySQL Not grabbing everything for my hack?
This is why I hate working with MySQL.
I'm translating a hack from wBB 1.2 to vB 3.0.3 so that I can use it on my forums. Problem is, I think I'm using the right code, but the SQL query is only grabbing one of the objects in the table, and not all of them. PHP Code:
|
#2
|
||||
|
||||
Well, this code is moreless the same as:
PHP Code:
Furthermore, your code does not support table prefixes: PHP Code:
|
#3
|
||||
|
||||
I know it doesn't support prefixes, as it's custom to my forums and we don't have a prefix.
|
#4
|
|||
|
|||
First off why are you running this query?
PHP Code:
PHP Code:
|
#5
|
||||
|
||||
Thanks Brad, I've changed things around now to this.
PHP Code:
|
#6
|
||||
|
||||
PHP Code:
$item_results is an associative array (with keys id, swordname and money). You can't use this as a parameter for fetch_array(), which expects a mySQL result resource (eg. a handle which basically is an integer). I can only guess that what you want to do is smth. like tis: PHP Code:
|
#7
|
||||
|
||||
Yes, that is what I want. But it doesn't work when I replace the echo with a template. I still only get one item.
|
#8
|
||||
|
||||
be sure to fetch the template like this:
eval('$template .= "' . fetch_template('item') . '";'); with a .= if you forget the . it just overwrites the variable. |
#9
|
||||
|
||||
... a dot...
I cannot believe I spent three whole days working on this and all I needed to add was a dot... Thanks. I'll go hit my head on something now. [high]* Ryan Ashbrook bangs head on desk... [/high] That's for the help. |
#10
|
||||
|
||||
no problem...
oh and... write it down for next time |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|