查询我写的phpmyadmin工作正常,并没有使用我的代码

时间:2016-04-13 13:20:51

标签: php sql codeigniter-2

我想要执行的查询

  "select * from `users` where `paid`= '0' and `experience_with`= 'baby_1_3' and `active`=1 and `type`='job_searcher'" 

我使用codeigniter所以o执行我写

  print $query.$condition; //to see the query
$query = $this->db->query($query.$condition);
$result = $query->result();
return $result;

没有错误只选择所有用户

1 个答案:

答案 0 :(得分:1)

$ query = mysql_query(“select * from paid其中experience_with ='0'和active ='baby_1_3'和type = 1和{{1} } = 'job_searcher'“); $ result = mysql_fetch_assoc($ query); 的print_r($结果);