Hi what is ther problem of this code: <?php include'global.php'; $result=mysql_query("SELECT * FROM articles ORDER BY id LIMIT 20"); $row = mysql_fetch_array($result); while($row){ echo $title=$row['title'],$name=$row['name']; } ?> PHP: It brings a long result after a long time ( so long that IE cannot browse it and I have to use firefox) in addition, the result is not what I need. I need the title of 20 last post articles
Part of the problem is the select statement. I don't know the names of your DB fields (use phpmyadimn to find out), but it should be something like this: $result=mysql_query("SELECT `title` FROM `articles` ORDER BY `id` LIMIT 20"); That is assuming your id is the key. If id is not an autogenerated number, then you'll want to order by submission date.