Home > Backend Development > PHP Tutorial > 急求php mysql中where的有关问题

急求php mysql中where的有关问题

WBOY
Release: 2016-06-13 10:35:38
Original
748 people have browsed it

急求php mysql中where的问题
请各位大侠帮我看看
$select = $this->db->select();
$select->from(PREFIX . $this->_table.' as s', '*');
$select->where($this->db->quoteInto('s.parent_category_id=?',$param->goods_category_id));
if($param->display_order){
  $select->where($this->db->quoteInfo('s.type_id in(1,2,3,4)')); 这一行不知道哪里错了
  $select->where($this->db->quoteInfo('s.display_order=?',$param->display_order));
}
新手求助,谢谢

------解决方案--------------------
$select->where($this->db->quoteInfo('s.type_id in(?)'), array(1,2,3,4));试一试

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template