Code: Select all
$sql = "SELECT * FROM table WHERE col1 LIKE \"%$searchterms%\" OR shortdesc LIKE \"%$searchterms%\" OR longdesc LIKE \"%$searchterms%\"";Now before we go any further, I would like to point ouy that I have searched these forums for answers but still have problems
First off I tried using this method:
Code: Select all
$sql = "SELECT * FROM table WHERE col1 LIKE \"%{$searchterms}%\" OR shortdesc LIKE \"%{$searchterms}%\" OR longdesc LIKE \"%{$searchterms}%\"";Code: Select all
$sql = "SELECT * FROM table WHERE col1 RLIKE [[:<:]]".$searchterms."[[:>:]] OR shortdesc RLIKE [[:<:]]".$searchterms."[[:>:]] OR longdesc RLIKE [[:<:]]".$searchterms."[[:>:]]";So basically, I would like some help in resolving my problems or any advice as to other methods by which I can achieve my goal. I will explain further if anything is unclear.
Thanks
EDIT:
Sorry if this is in the wrong forum, I was unsure where to stick it.