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;

Comments

Popular posts from this blog

WP register_post_type() with custom CMB2 meta box

Git post receive setup at server for git push to the production from local machine