i want to make this script to read from the last id in the database to
id 0 (the first one in the database)last number changes all the
time when somone add's new news..
can somone plz tell me how to do it
im trying to do it for 2 days now
(yes im a noob at php stil learning
i found this script at the internet)
id 0 (the first one in the database)last number changes all the
time when somone add's new news..
can somone plz tell me how to do it
im trying to do it for 2 days now
(yes im a noob at php stil learning
i found this script at the internet)
![shadow-xx - [Help!!][PHP]Newssystem DB read - RaGEZONE Forums shadow-xx - [Help!!][PHP]Newssystem DB read - RaGEZONE Forums](https://forum.ragezone.com/images/404_image.png)
Code:
<?php
include('config.php');
mysql_connect($host, $user, $pass);
mysql_select_db($db);
$sql = "SELECT * FROM news";
$result = mysql_query($sql);
$num = mysql_num_rows($result);
while($row = mysql_fetch_array($result)){
echo "<font size=4><b>".$row['title']."</b></font><br><font size=1>".$row['writer']."</font>";
echo "<font size=-2> - ".$row['posted_at']."</font><br><br>";
echo "<font size=-1>";
include($row['text_url']);
echo "</font>";
}
mysql_close();
?>