PDA

View Full Version : What's the problem with querys in Vbulletin Pages !


Creative Suite
01-04-2005, 07:02 PM
Hi all :)

at first i wanna to apologize for my english If any one will not understand me :)

Secondly i have an query , i'm using it to get banners from datebase

$doquery = $DB_site->query("select * from " . TABLE_PREFIX . "adv where main ='1' order by 'id' desc ");
while($row=$DB_site->fetch_array($doquery)){

eval('$show = "' . fetch_template('adv_creativeSuite') . '";');


}

adv_creativeSuit template

<a href='$row[url]' target='_blank'><img border='0' src='$row[image]' alt='$row[name]'></a>

in vbulletin pages , it's give me just one row ! , In spite of i have more than one !

but win i use it in external php file , it's give me all rows


comment*: all querys give me the same problem in vbulletin pages :(

at last i hope that any one understand what did i mean , and give me the solution :ermm:


thank you

Tigga
01-04-2005, 07:15 PM
eval('$show .= "' . fetch_template('adv_creativeSuite') . '";');

Link14716
01-04-2005, 07:22 PM
Yeah, you need to put a dot in from of the = sign.

Xenon
01-04-2005, 11:51 PM
also it would be much better to use a different variable name as $show is a vbulletin variable used for other things ;)

Creative Suite
01-05-2005, 01:41 AM
thank you Tigga & Link14716

it's working now :)

@Xenon

i am going to change it absolutely ;)

my best wishes