Hi Guys,
I've developed a news system (very basic really) and i'm displaying the articles on a page. I don't however want the entire text of an article being displayed, and therefore only want say the first 50 words to be displayed.
Below is the query i'm currently using:
mysql_select_db($database_localhost, $localhost);
$query_rsNews = "SELECT id, headline, articleBody, image, dateAdded FROM news";
$query_limit_rsNews = sprintf("%s LIMIT %d, %d", $query_rsNews, $startRow_rsNews, $maxRows_rsNews);
$rsNews = mysql_query($query_limit_rsNews, $localhost) or die(mysql_error());
$row_rsNews = mysql_fetch_assoc($rsNews);
The row in question is articleBody.
Could someone please help to modify this query so that it only displays x number of words.
Thanks for any help anyone can give
Danny