0

I am using WordPress, and in MySQL database i have meta_values for meta_key=first_name and meta_key=last_name.

Now i want to create in MySQL database a meta_key=full_name

I have tried different ways but i haven't been successfull doing it. Any suggestion how i can solve this?

Thank you.

Legjion
  • 1
  • 1
  • Welcome to SO, please read about [how to ask a question](https://stackoverflow.com/help/how-to-ask) in this site. Always be specific and make your best effort before asking, and don't treat Stack Overflow as a repository of tutorials. Stack Overflow is a question and answer site, not a code-writing service. Please [see here](http:s//stackoverflow.com/help/how-to-ask) to learn how to write effective questions. Also you mention that you tried many ways you did include none. Why do you want to create a new meta_key? you can concatenate `first_name` and `last_name` using a simple query. – Teocci Apr 28 '17 at 00:48
  • I have in the table values for `meta_key=first_name` and `meta_key='first_name' ` I need `meta_key=full_name` I think there should be a better solution , bu i tried to create it manually in MySQL but i was not able to give a query. `SELECT user_id,meta_key,meta_value FROM {$wpdb->usermeta} WHERE ({$wpdb->usermeta}.meta_key = 'first_name' AND {$wpdb->usermeta}.meta_key = 'last_name')"; meta_key=full_name WHERE full_name='first_name'. 'last+name';` – Legjion Apr 28 '17 at 07:19

0 Answers0