我正在尝试使用sprintf()和格式符号进行查询,但它无法正常工作
sprintf('SELECT pk_i_id FROM %st_item WHERE s_contact_email IN %s ORDER BY dt_pub_date LIMIT 0, %d', DB_TABLE_PREFIX, $email, $countOfItems
)
这里
DB_TABLE_PREFIX = "ww_";
$email = "email01@hotmail.com, email03@hotmail.com, email02@hotmail.com";
$countOfItems = 5;
答案 0 :(得分:1)
使用此格式搜索多个选项:$ email =“('email1','email2','email3')”;