> I'm trying to build a news panel for my home page. Basically I want to
> present the five most recent news articles in a recordset, but I'm not
> sure how to cut off the recordset after 5.
> Also I want to present a picture with my first headline.
>
> My code will go something like this:
>
> <?php
>                 // Start News Wotsit.
>                 // Create Recordset
>                 $gubbins = "SELECT * FROM tblContent WHERE pageParent =
> 3 ORDER BY pageDate DESC";

SELECT * FROM tblContent WHERE pageParent = 3 ORDER BY pageDate DESC LIMIT 5

Now your result only has 5 results returned. Loop through them with
mysql_fetch_assoc() and display accordingly.

---John Holmes...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to