mongodb 中有类似内容吗?如果我们使用动态变量并打印查询,则它应该使用其中的值打印查询,如下所示。
int name = 'john';
int age = 23;
// how we do it in PHP
$query = 'select * from students where name='"name"' and age='"age"';
echo $query;
// result
select * from students where name='john' and age='23';
// how we do it in codeigniter
echo $this->db->last_query();
// result
select * from students where name='john' and age='23';