SitePoint Sponsor

User Tag List

Results 1 to 1 of 1

Thread: CONCAT Query

  1. #1
    SitePoint Enthusiast Yonko's Avatar
    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"
    with this one

    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"); 
    in a single query.

    THANKS
    Last edited by Yonko; Jul 7, 2001 at 10:46.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •