Hi all,
Just started with php and mysql, I have a small script which fetches the stuff from the database but how would I change it so it just displays the last 10 say and displays them in a certain order.
My query is
<?php
require_once("./connect.php");
$result = @mysql_query('SELECT newstext FROM news');
if (!result) {
exit('<p>Error performing fetch from database: ' . mysql_error () . '</p>');
}
while ($row = mysql_fetch_array($result)) {
echo '<p>' . $row['newstext'] . '</p>';
}
?>
Thanks alot🙂