I had encountered searching multiple columns using a single input control, a textbox. That is searching from a last name and first name column using any of the two. So I have here the code to do that.
Table
![]() |
STUDENT |
MySQL Code
SELECT * FROM `student` WHERE CONCAT(stud_first,stud_last) like "%ua%"
The query above will search for first name or last name with "ua".
Output

0 comments:
Post a Comment