|
楼主 |
发表于 2017-3-21 11:02:58
|
显示全部楼层
结果:
object(CI_DB_pdo_result)#17 (8) { ["conn_id"]=> object(PDO)#14 (0) { } ["result_id"]=> object(PDOStatement)#16 (1) { ["queryString"]=> string(177) "SELECT * FROM `sls_article` WHERE `atid` = 21 AND ( `keyword` LIKE '%|关羽|%' ESCAPE '!' OR `keyword` LIKE '关羽|%' ESCAPE '!' OR `keyword` LIKE '%|关羽' ESCAPE '!' )" } ["result_array"]=> array(0) { } ["result_object"]=> array(0) { } ["custom_result_object"]=> array(0) { } ["current_row"]=> int(0) ["num_rows"]=> NULL ["row_data"]=> NULL }
查询语句
$query=$this->db->select('*')
->from('article')
->where('atid',21)
->group_start()
->like('keyword','|关羽|','both')
->or_like('keyword','关羽|','after')
->or_like('keyword','|关羽','before')
->group_end()
->get();
var_dump($query);
是不是我用的->get 函数不对? 有没有ci pdo的函数手册
|
|