White_Snake
03-02-2010, 06:06 PM
hello!
the following piece of code is not working, im inserting this on a standalone php page inside vbulletin directory, but the while function is not working, it doesnt returns anything at all
<?php
require_once('./global.php');
$qall = $vbulletin->db->query_read("SELECT * FROM gift");
while($pdisplay = $vbulletin->db->fetch_array($qall));
{
echo $pdisplay['gift_desc'];
}
?>
im pretty sure my query is working because if i use a print_r() it works, and i get the first value of the query displayed on my page:
<?php
require_once('./global.php');
$qall = $vbulletin->db->query_read("SELECT * FROM gift");
echo'<pre>';
echo print_r($vbulletin->db->fetch_array($qall));
echo'</pre>';
?>
that code works perfectly, but the first one with the while loop does not, anybody can help me please? :) thanks
the following piece of code is not working, im inserting this on a standalone php page inside vbulletin directory, but the while function is not working, it doesnt returns anything at all
<?php
require_once('./global.php');
$qall = $vbulletin->db->query_read("SELECT * FROM gift");
while($pdisplay = $vbulletin->db->fetch_array($qall));
{
echo $pdisplay['gift_desc'];
}
?>
im pretty sure my query is working because if i use a print_r() it works, and i get the first value of the query displayed on my page:
<?php
require_once('./global.php');
$qall = $vbulletin->db->query_read("SELECT * FROM gift");
echo'<pre>';
echo print_r($vbulletin->db->fetch_array($qall));
echo'</pre>';
?>
that code works perfectly, but the first one with the while loop does not, anybody can help me please? :) thanks