TecTao Posted November 22, 2007 Share Posted November 22, 2007 I want to loop through a table of current news articles. On a page I want to trim the articles down to display only the first say 200 characters. Also I want to have it loop through and display only the 5 most recent entries. Any help on the query Thanks in advance m Quote Link to comment Share on other sites More sharing options...
revraz Posted November 22, 2007 Share Posted November 22, 2007 Post what you have so far. Quote Link to comment Share on other sites More sharing options...
TecTao Posted November 22, 2007 Author Share Posted November 22, 2007 Here's the beginning code: <? $results = mysql_query("SELECT * FROM current_news ORDER BY n_date"); while ($row = mysql_fetch_array($results)) { extract($row); echo $n_news; $row_count++; } mysql_close; ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.