-2
I would like to put one with in an SQL query for example:
wp_usermeta.meta_key = 'first_name' or wp_usermeta.meta_key ='last_name'
I’d like to put red here 'last_name'
it is possible?
Follow the code of the full consultation:
$sql = ("select DISTINCT ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." userid, (select REPLACE(Group_concat(wp_usermeta.meta_value),',',' ') as full_name from wp_users left join wp_usermeta on wp_users.ID = wp_usermeta.user_id where (wp_usermeta.meta_key = 'first_name' or wp_usermeta.meta_key ='last_name') and wp_users.ID = userid) username, ".TABLE_PREFIX.DB_USERTABLE.".user_nicename link, wp_usermeta.meta_value avatar, cometchat_status.lastactivity lastactivity, cometchat_status.status, cometchat_status.message, cometchat_status.isdevice from ".TABLE_PREFIX.DB_USERTABLE." left join wp_usermeta on ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." = wp_usermeta.user_id left join cometchat_status on ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." = cometchat_status.userid ".$offlinecondition." and (wp_usermeta.meta_key = 'user_avatar' ) order by username asc");
I don’t understand, want to color your PHP code is this?
– Jorge B.
If you want to put color it is not in the query that should do it but in PHP / HTML
– Fabio Cardoso
This put in php
– Hemerson Prestes