MySQL Query -> get first_name and last_name from a field where is user_full_name
SELECT
SUBSTRING_INDEX(user_full_name,' ',1) as first_name,
SUBSTRING_INDEX(user_full_name,' ',-1) as last_name
FROM users WHERE id=1;
SUBSTRING_INDEX(user_full_name,' ',1) as first_name,
SUBSTRING_INDEX(user_full_name,' ',-1) as last_name
FROM users WHERE id=1;
Comments
Post a Comment