View Single Post
  #3 (permalink)  
Old May 13th, 2008, 22:00
awatson awatson is offline
Junior Member
Join Date: Feb 2008
Location: Michigan
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Search Bar CONCAT query

I think your where clause is messed up - try

WHERE contacts.forename = '$search' OR
contacts.surname = '$search' OR
CONCAT(contacts.forename, ' ', contacts.surname) = '$search'
Reply With Quote