Nexus_Noob
Новичок
PHP:
$max_id_in_bd=8;
$mess = array();
$query = "SELECT * FROM `chat` WHERE `id` >0 AND `id` <=".$max_id_in_bd." ORDER BY `id` DESC LIMIT 0 , 30";
$res = mysql_query($query) or die(mysql_error());
while($row = mysql_fetch_array($res)){
$mess[] = array("id"=>$row['id'], "name"=>$row['name'], "text"=>$row['text'], "date"=>$row['date'], "group"=>$row['group'], "last_active"=>$row['last_active']);
};