我用过 WHERE user_contact_info.master_admin = 1
在 $users_list1
但它不起作用。我也习惯了 AND user_contact_info.master_admin = 1
但它不起作用。 $users_list2
在没有内部连接的情况下工作。我该怎么修 $users_list1
sql?谢谢!
sql 1
$users_list1 = $wpdb->get_results( "SELECT
user_contact_info.id,
user_contact_info.user_name,
user_contact_info.user_title,
user_contact_info.user_direct,
user_contact_info.user_mobile,
user_contact_info.user_mail_address,
user_contact_info.user_email,
user_contact_info.master_admin,
company_info.com_name
FROM user_contact_info
INNER JOIN company_info
ON user_contact_info.user_company = company_info.id WHERE user_contact_info.master_admin = 1
ORDER BY company_info.com_name ASC
limit $offset, $limit" );
sql 2数据库
$users_list2 = $wpdb->get_results( "SELECT * from user_contact_info WHERE master_admin = 1 ORDER BY user_name ASC limit $offset, $limit" )
暂无答案!
目前还没有任何答案,快来回答吧!