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
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'

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.