0

hi everyone
i need your help
i want to write a code that gets for me the latest 5 out puts
here is my code

<?php
					$con = mysql_connect("localhost","awah","pass");
					if(!$con)
					{
					echo "cant connect to db".mysql_error();
					}
					$select = mysql_select_db("awah_admin");
					if(!$select)
					{
					echo "cant select db ".mysql_error();
					}
					$query = mysql_query("SELECT*FROM news ORDER BY news DESC");
					while($row = mysql_fetch_array($query))
					{
					echo "<B>".$row['title']."<BR>-------------------------------<BR><B>";
echo $row['news']."<BR>**********************************************<BR>";
}

but this code cant give me the latest 5 news .
so how can i get the lates 5 news . please tell what to do

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by Awah Mohamed
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.