$sql="SELECT * FROM parama ".(!empty($sql) ? "WHERE ".$sql : "")." ORDER BY dt DESC LIMIT ".$cnt;
$result=mysql_query($sql,$conn) or die(mysql_error());
if(!mysql_num_rows($result))
return array(); //Neradus rezultatu, grazinti tuscia masyva
// Sukeliam rezultatus i masyva
$arr=array();
$kount=0;
while($arr[$kount] = mysql_fetch_assoc($result))
$kount++;
return $arr;