Adrian Schneider
02-04-2005, 03:33 AM
For a mySQL query, how would you make every second result different (such as 2 different styles)?
if ($_REQUEST['do'] == 'maps')
{
if (is_member_of($bbuserinfo, 6) OR is_member_of($bbuserinfo, 19))
{
$getmaps=$DB_site->query("SELECT * FROM maps");
while($maps=$DB_site->fetch_array($getmaps))
{
$mapid = $maps['id'];
$mapname = $maps['name'];
$mapheight = $maps['height'];
$mapwidth = $maps['width'];
$maptileset = $maps['tileset'];
$mapimage = $maps['image'];
$mapauthor = $maps['author'];
$mapstacked = $maps['stacked'];
$mapplayers = $maps['players'];
$mapauthoremail = $maps['authoremail'];
$mapfile = $maps['file'];
$mapdescription = $maps['description'];
eval('$downloads_mapsbit .= "' . fetch_template('downloads_mapsbit') . '";');
}
eval('print_output("' . fetch_template('downloads_maps') . '");');
}
}
Thanks.
if ($_REQUEST['do'] == 'maps')
{
if (is_member_of($bbuserinfo, 6) OR is_member_of($bbuserinfo, 19))
{
$getmaps=$DB_site->query("SELECT * FROM maps");
while($maps=$DB_site->fetch_array($getmaps))
{
$mapid = $maps['id'];
$mapname = $maps['name'];
$mapheight = $maps['height'];
$mapwidth = $maps['width'];
$maptileset = $maps['tileset'];
$mapimage = $maps['image'];
$mapauthor = $maps['author'];
$mapstacked = $maps['stacked'];
$mapplayers = $maps['players'];
$mapauthoremail = $maps['authoremail'];
$mapfile = $maps['file'];
$mapdescription = $maps['description'];
eval('$downloads_mapsbit .= "' . fetch_template('downloads_mapsbit') . '";');
}
eval('print_output("' . fetch_template('downloads_maps') . '");');
}
}
Thanks.