I'm trying to display a row on the form from a table - pretty straight forward.
Lets assume that we have 10 records in the table and all being displayed.when we have a 11th record inserted into the table,
"I want only the newest 10 records or the last 10 records which are being entered to be displayed on the form and the others being omitted."
How can I do this one?would somebody be able to guide me.
Thanks everybody
The following code displays the records(I'm posting my code just for reference)
<?php
//db connection
$select_query = "SELECT PARENTTOPIC_NAME FROM topic";
$result = mysql_query($select_query);
$numrows = mysql_num_rows($result);
while($row = mysql_fetch_array($result)){
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>humor</title>
</head>
<body>
<table border="1" width="100%">
<tr>
<td width="100%">
<?
echo "<br>\n", " $row[PARENTTOPIC_NAME]";
?>
</td>
</tr>
</table>
<?
}
?>
</body>
</html>