Jump to content

search with full name..


techker

Recommended Posts

Hey guys i have a form that shows the full name of a student.

 

like student : Micheal Jackson

 

i need to search the database for that student.

 

but my tables have first name and last name

so the issue i have is i got the full name when in my database i have 2 columns first and last name...

 

so in phpmyadmin i tried the search tab.

 

so i pasted the full name in

 

first and tried LIKE-LIKE%% =....

 

but nothing worked??

Link to comment
https://forums.phpfreaks.com/topic/268189-search-with-full-name/
Share on other sites

Hopefully, Michael's brother, Jackson Jackson isn't a student too, because that will match him. Also, their distant cousin Jackson Michael and his brother Michael Michael, and other first/last names that can be used as either - Martin Davis, Thomas Martin, Scott Thomas, ... I would concatenate the fields -

 

CONCAT_WS(' ',firstname,lastname) = 'Michael Jackson'

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.