So i'm working on this site and i just added a search button. Everything works fine when i use a simple search query like
SELECT `student_id` FROM `student` WHERE `username` LIKE 'jo%' OR `firstname` LIKE 'jo%' OR `lastname` LIKE 'jo%' OR `surname` LIKE 'jo%' OR `email` LIKE 'jo%'
This will return all id with a name that matches john from a database by looking at the fields 'username', firstname, lastname, and so on.
Th problem however is, when the user inserts a space between the search parameter (which in essence means he is searching a student by both names), the result is nothing.
I figured that this is because the it is looking for the search parameter (say, 'john doe') independently in each field.
How do i work around this.