Results 1 to 1 of 1
Thread: CONCAT Query
Jul 7, 2001, 09:28 #1
- Join Date
- Jun 2001
- 0 Post(s)
- 0 Thread(s)
PLEASE!!! HELP ME!!! CONCAT Query
How I can combine a CONCAT query that limits the number of words to be displayed with one that sorts my results?
$num_words = 60;
$sql = "SELECT CONCAT(SUBSTRING_INDEX(Text, ' ', $num_words), '...') as synopsis FROM News";
$result = mysql_query(
"select * from News, Authors, Categories WHERE News.AID=Authors.ID AND News.CID=Categories.ID AND News.CID=1 ORDER BY Date LIMIT 1");
Last edited by Yonko; Jul 7, 2001 at 09:46.