SitePoint Sponsor |
|
User Tag List
Results 1 to 1 of 1
Thread: CONCAT Query
-
Jul 7, 2001, 10:28 #1
- Join Date
- Jun 2001
- Location
- Panama
- Posts
- 79
- Mentioned
- 0 Post(s)
- Tagged
- 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?
Example:
PHP Code:$num_words = 60;
$sql = "SELECT CONCAT(SUBSTRING_INDEX(Text, ' ', $num_words), '...') as synopsis FROM News";
PHP Code:$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");
THANKSLast edited by Yonko; Jul 7, 2001 at 10:46.
Bookmarks