The Arcive of vBulletin Modifications Site. |
|
LIMIT query using a variable Details »»
|
|||||||||||||||||||||||||
Im writing a hack that depending on the number entered in vBOptions, will limit the ammount of TR/TD tags there are using a query. I've tried this code:
PHP Code:
But this only shows one row of code when I entered 5 in options. Anyone shed some light on this Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
you shouldn't get a single row, as your using an DB result and not a normal array.
you have to add a whileloop fetch_array afterwards
|
|
#3
|
||||
|
||||
|
Good idea, I'll try that - thanks
|
|
#4
|
||||
|
||||
|
Ok, here is the code i'm using now:
PHP Code:
"Warning: mysql_fetch_array supplied argument is not a valid MySQL result resource in db_mysql.php Any ideas why? |
|
#5
|
||||
|
||||
|
are you sure $numofportfolio is set at least at 1?
also in your eval code you missed a . |
|
#6
|
||||
|
||||
|
$numofportfolio currently is set at 5
And thanks, I was copying off another screen
|
|
#7
|
||||
|
||||
|
bump
|
![]() |
|
|