My code is this:
elseif ($criteria == 'doctoratedegree')
$query->where('postgradcourses', 'LIKE', '%' . $searchItem . '%');
So basically in the front end, a person will select "Doctorate degree" in the form drop down menu, then type the course they want to search for and the code will look for the course in the postgradcourses column of the courses database table. problem is, the Masters degree option in the menu is coded in the same way where the code will also look in the postgradcourses column.
How can I modify the query code so that it searches for: PhD in . $searchItem . ?
Basically, the code will add a specific string along with whatever the person searched for.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire