![]() |
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:
|
Well, this code is moreless the same as:
PHP Code:
Furthermore, your code does not support table prefixes: PHP Code:
|
I know it doesn't support prefixes, as it's custom to my forums and we don't have a prefix. ;)
|
First off why are you running this query?
PHP Code:
PHP Code:
|
Thanks Brad, I've changed things around now to this.
PHP Code:
|
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:
|
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.
|
be sure to fetch the template like this:
eval('$template .= "' . fetch_template('item') . '";'); with a .= if you forget the . it just overwrites the variable. |
... 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. :p |
no problem...
oh and... write it down for next time ;) |
All times are GMT. The time now is 05:12 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|