Jump to content

[SOLVED] Ordering by Last Name when the Field is Name


cooldude832

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.

 

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.