![]() |
selecting random entry from db
ok i have this code
$battlescene=$DB_site->query("SELECT name FROM rpg_battlescenes ORDER BY rand() LIMIT 1"); to select a random "name" entry from the db and i want to be able to use $battlescene in a template, i THOUGHT you would do this eval("\$battlescene = \"".gettemplate("battle_arena")."\";"); but for some reason it's not doing what i want it too, is the code right so far? also right under all that code is eval("dooutput(\"".gettemplate('battle_arena')."\" );"); does that have anything to do with how i would go about this? |
you have to use $battlescene[name] within your template
|
im gonna kick myself now
lol thanks xenon |
All times are GMT. The time now is 02:09 AM. |
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:
|