Posts: 10,289
Name: Knight13
Location: Cleveland, Ohio
|
At the end of your query add LIMIT 20
PHP Code:
<?php
$sql = mysql_query('SELECT * FROM news WHERE sentinfo = curdate() ORDER BY senttime DESC LIMIT 20');
while($row = mysql_fetch_assoc($sql)) { echo '<td><strong>'. $row['username'] .':</strong></td> <td>' . $row['comment'] . '</td> <br /> <em>posted at </em> <td>' . $row['senttime'] . '</td> <br /> <br />'; }
?>
Also i fixed a few tags in your coding.
Last edited by Knight13; 12-02-2009 at 02:43 PM..
|