Jump to content

Recommended Posts

This is kinda a shot in the dark, but it might work.

 

SELECT SUBSTRING_INDEX(name, ' ', -1) AS last FROM users ORDER BY last

 

Where it says "name", that is where you put the field name where the first and last name is stored.

 

People will have to update their data as the last table was horribly built and all the PHD, MD, Mr, Ms stuff was part of the name field that just was disgusting to me so I tried to put it in the new table and it came out ugly.

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.