mysqli查询语句不起作用

I have written a mysqli statement for advanced search of my website. the generated query does not work. here is the generated query:

 SELECT title, stars, pic_main, id, province FROM ads WHERE 'province' = 8 AND( title LIKE %شریف% OR content LIKE %شریف% OR keywords LIKE %شریف% OR title LIKE %شریف%)

And here is the code that I use to execute the query:

if($transorder = $site_db->query($statement))
{
    echo "True";
    $i=0;
    while($row_obj = $transorder->fetch_object())
    {
        $item[$i]['id'] = $row_obj->id;
        $item[$i]['pic_main'] = $row_obj->pic_main;
        $item[$i]['title'] = $row_obj->title;
        $item[$i]['province'] = $row_obj->province;
        $item[$i]['stars'] = $row_obj->stars;       
        $i++;
    }
}
else
{
    echo "False";
}
查看全部
dongmao3131
dongmao3131
2013/12/01 18:32
  • search
  • php
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

1个回复