简体   繁体   中英

Return data from meta_value that has the same row in meta_key

See image of the table here: [1]: https://i.stack.imgur.com/KjWIQ.png

How do I show data from 'designs_save_user_list' of all user_id that contain 'account_parent' and with the same number in the meta_value?

I'm only able to see the data of a user, but I want to see everyone who has the same number in the account_parent

the current code is:

if(is_user_logged_in()){
        $user_ID = get_current_user_id();       
        $get_designs_list = get_user_meta($user_ID, 'designs_save_user_list', true);
       if(is_user_logged_in()){
                $user_ID = get_current_user_id();       
                $account_parent = get_user_meta($user_ID, 'account_parent', true);
                if (isset($account_parent) && $account_parent == 2 ){
                    $get_designs_list = get_user_meta($user_ID, 'designs_save_user_list', 
                    true); 
           }
    }

check this code if its work for you

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM