ok then my last question

this code gives me last x images for x times
but I want it to give me last x images for 1 time

<?php
define('ROOT_PATH', './');
include(ROOT_PATH.'global.php');
require(ROOT_PATH.'includes/sessions.php');
$user_access = get_permission();
$cat_id_sql = get_auth_cat_sql("auth_viewcat", "NOTIN");
$number_of_news = 5;
$sql = "SELECT i.image_name, i.image_id, i.image_date, c.cat_name, u.user_name
FROM ".IMAGES_TABLE." i, ".CATEGORIES_TABLE." c, ".USERS_TABLE." u
WHERE i.image_active = 1 AND i.cat_id NOT IN ($cat_id_sql) AND i.cat_id = c.cat_id AND i.user_id = u.user_id $cat_match_sql
ORDER BY i.image_date DESC
LIMIT $number_of_news";
$result = $site_db->query($sql);
$new_images_list = array();
$i = 1;
while ($row = $site_db->fetch_array($result)) {
$new_images_list[$i] = $row;
$i++;
}
$site_db->free_result();
for ($i = 1; $i <= $number_of_news; $i++) {
if (isset($new_images_list[$i])) {
$result = $site_db->query($sql);
while ($row = $site_db->fetch_array($result)) {
$image_id = ($row['image_id']);
$image_name = ($row['image_name']);
$image_link = ("<a href=\"" . ROOT_PATH . "details.php?image_id=" . $image_id . "\">");
$image_date = format_date($config['date_format']." ".$config['time_format'],$new_images_list[$i]['image_date']);
$news = (":: <b>" . $new_images_list[$i]['image_name'] . "</b> ( <b>" . $new_images_list[$i]['cat_name'] . " </b>) <br>" );
echo "<ul><b>$image_name</b> $image_link ...view image </a></ul>";
}
}
}
?>
this code gives me last 5 images for 5 times

I WANT TO LIST LAST 5 IMAGES FOR 1 TIME
please help me with this code , without any other codes