There are such tables, the data of which I need to combine on the basis of one parameter (subscriber_id and ID), where one and the second is equal to '2'
I make a request ..
SELECT wp_mymail_subscriber_fields.meta_value, wp_mymail_subscribers.email FROM wp_mymail_subscribers, wp_mymail_subscriber_fields, wp_mymail_subscriber_meta WHERE wp_mymail_subscriber_meta.subscriber_id = '2' AND wp_mymail_subscriber_fields.subscriber_id = '2' AND wp_mymail_subscribers.ID = '2' group by `meta_value` ORDER BY `meta_value` DESC In return, I get
But how to make meta_value, where meta_key = 'firstname' is output as fname, and meta_value, where meta_key = 'lastname' as lname?


