what is wrong in that code ?
PHP Code:
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'test'); // change this depending on your filename
// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array(
);
// get special data templates from the datastore
$specialtemplates = array(
);
// pre-cache templates used by all actions
$globaltemplates = array(
'screeny',
);
// pre-cache templates used by specific actions
$actiontemplates = array(
);
// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################
$navbits = array();
$navbits[$parent] = 'Testowa Strona';
$sql = $db->query_read ("SELECT * FROM `amx_screenshots` ORDER BY ssid DESC");
while( $row = $db->fetch_array($sql) )
{
$x++;
$gracz = $row["player_username"];
$admin = $row["admin_username"];
$data = $row["screenshot_time"];
$mapa = $row["map"];
$ip = $row["player_authid"];
$data = date("H:i:s d.m.Y",$data);
/*
$template->assign_block_vars('screeny', array(
'ID' => $x+$start,
'GRACZ' => $gracz,
'ADMIN' => $admin,
'DATA' => $data,
'MAPA' => $mapa,
'IP' => $ip)
);*/
}
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('screeny') . '");');
?>
it shows me only the last entry in the table instead of all