stryka
02-15-2003, 02:27 PM
I hacked up memberlist.php to create my own php file that pulls multiple records from a custom table...
currently -> the file only shows 1 record... which is the first record of each page... although i indicate to show atleast 10 records @ a time... can you tell me what is wrong with the "WHILE" statement or if there is anything else i should look for... assume that other variables are set just like the memberlist.php file...
the only way it shows more than one record is if i add an echo after the 'while' statement... (see red entry)
$query1=$DB_site->query("SELECT *
FROM DB
WHERE $condition
ORDER BY $orderby $direction
LIMIT ".($limitlower-1).",$perpage");
$counter=0;
while ($queryinfo=$DB_site->fetch_array($query1) and $counter++<$perpage)
{
echo $counter;
if ($queryinfo[name]) {
eval("\$queryinfo[namelink] = \"".gettemplate("name_postbit")."\";");
} else {
$queryinfo[name]=" ";
}
eval("\$show_namelist .= \"".gettemplate("show_namelist ")."\";");
eval("dooutput(\"".gettemplate("show_namelist")."\");");
} // end while
currently -> the file only shows 1 record... which is the first record of each page... although i indicate to show atleast 10 records @ a time... can you tell me what is wrong with the "WHILE" statement or if there is anything else i should look for... assume that other variables are set just like the memberlist.php file...
the only way it shows more than one record is if i add an echo after the 'while' statement... (see red entry)
$query1=$DB_site->query("SELECT *
FROM DB
WHERE $condition
ORDER BY $orderby $direction
LIMIT ".($limitlower-1).",$perpage");
$counter=0;
while ($queryinfo=$DB_site->fetch_array($query1) and $counter++<$perpage)
{
echo $counter;
if ($queryinfo[name]) {
eval("\$queryinfo[namelink] = \"".gettemplate("name_postbit")."\";");
} else {
$queryinfo[name]=" ";
}
eval("\$show_namelist .= \"".gettemplate("show_namelist ")."\";");
eval("dooutput(\"".gettemplate("show_namelist")."\");");
} // end while