i have tow tables, posts and sections, i want to get the last 10 posts WHERE section = 1,
but use the 10 results in different places, i make a function
function sectionposts($section_id){
mysql_set_charset('utf8');
$maxpost1 ="SELECT max(id) from posts WHERE section_id = $section_id ORDER BY ID DESC LIMIT 10";
$maxpost10 =mysql_query($maxpost1);
return($maxpost10);
}
$query2 = sectionposts(6);
while ($rows = mysql_fetch_array($query2)){
echo $rows['title'];
echo $rows['id'];
echo $rows['image_section'];
echo $rows['subject'];
echo $rows['image_post'];
how can in take this ten results but use them with different places ,and keep them Arranged from one to ten .
Thanks...