Hello masters!
I am total newbie in database-queries and stuff.
I have tried to understand how to limit entries on my page.
1. If i want to show only 5 entries on my index.php and add pagination after that. How do i do that?
2. How can i get entries on my index.php so that the newest will be first.
This is the code i have at the moment to get the news entries.
<?php
$getNews= $Db->select(TABLE_PREFIX . "news");
while($news = mysql_fetch_assoc($getNews))
{
echo '<h3>' . $news['title_txt'] . '</h3>';
echo date('d/m/y',$news['date_date']);
echo $news['body_txtbox'];
}
?>
Thanks in advance.
1 to 1 of 1