dongxianshuai8927 2016-07-15 12:50
浏览 119
已采纳

使用sprintf()和格式符号查询问题

I am trying to make query using sprintf() and format symbols but it is not working

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 )

here

DB_TABLE_PREFIX = "ww_";
$email = "email01@hotmail.com, email03@hotmail.com, email02@hotmail.com";
$countOfItems = 5;
  • 写回答

1条回答 默认 最新

  • dongyuchen9276 2016-07-15 13:16
    关注

    use this format to search in multiple options : $email = "('email1', 'email2', 'email3')";

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?