www.webdeveloper.com
Results 1 to 2 of 2

Thread: Search Query

  1. #1
    Join Date
    Feb 2006
    Posts
    91

    Search Query

    I have a seach query which will search user input from the TITLE field...

    Looks like this...
    PHP Code:
    $SQL "Select * from LISTINGS WHERE TITLE LIKE '%$value%' LIMIT 1000" 
    I now need to expand this so it will seacrch from additional fields (not just the TITLE field). Im just confused as to how to best construct the query..?

    Thanks for any input...

  2. #2
    Join Date
    Feb 2006
    Posts
    91
    wohoo, got it..

    PHP Code:
    $SQL "Select * from LISTINGS WHERE TITLE LIKE '%$value%' || ADDRESS LIKE '%$value%' || CITY LIKE '%$value%'  LIMIT 1000" 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles