Depending on your data, that could work fine. Edge cases like "Jay Random, Jr." will throw that off, but if you only have 5000+ names, you can inspect and fix those up manually.
A better scheme is to not assume that you can do manipulations like that on names, and to keep the "display" name (Bob Jones) separate from the "sort" name (Jones, Bob). All names aren't English, and the sorting rules for names are often non-obvious.
In reply to Re: MySQL last name field
by dws
in thread MySQL last name field
by perleager
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |