The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Can this be reduced
Can this be reduced into a single query? if so how do I call each attribute?
Code:
$memhealth=$DB_site->query_first("SELECT battle_health FROM user WHERE userid='$bbuserinfo[userid]'"); $battle_health=$memhealth[battle_health]; $memintel=$DB_site->query_first("SELECT battle_intel FROM user WHERE userid='$bbuserinfo[userid]'"); $battle_intel=$memintel[battle_intel]; $memmagic=$DB_site->query_first("SELECT battle_magic FROM user WHERE userid='$bbuserinfo[userid]'"); $battle_magic=$memmagic[battle_magic]; $memskill=$DB_site->query_first("SELECT battle_skill FROM user WHERE userid='$bbuserinfo[userid]'"); $battle_skill=$memskill[battle_skill]; $memarmor=$DB_site->query_first("SELECT battle_armor FROM user WHERE userid='$bbuserinfo[userid]'"); $battle_armor=$memarmor[battle_armor]; $DB_site->free_result($memhealth); $DB_site->free_result($memintel); $DB_site->free_result($memmagic); $DB_site->free_result($memskill); $DB_site->free_result($memarmor); eval("\$battle_mem_stats = \"".gettemplate('battle_mem_stats')."\";"); Quote:
Any help greatly appreciated. |
#2
|
||||
|
||||
The rest could be something like this:
PHP Code:
|
#3
|
|||
|
|||
Thanks, I will try it but I thought there had to be a while statment there somewhere.
|
#4
|
||||
|
||||
Uhmmm I don't think so.. Try it yourself and post here if you have any problem.
|
#5
|
|||
|
|||
All is good it worked great. Thanks
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|