1
我正在开发一个API,使用Codeigniter和Alex Bilbies oAuth2和MongoDB库。 我需要做一个MongoDB查询,我在这里查询_id为1且访问令牌为空的文档。MongoDB查询问题
我有这到目前为止,但它不工作:
$exists_query = $this->CI->mongo_db->select('access_token')->where(array('_id' => $session_id, 'access_token' != NULL))->get('oauth_sessions');
我想这太:
$exists_query = $this->CI->mongo_db->select('access_token')->where(array('_id' => $session_id))->where_not_equal('access_token', NULL)->get('oauth_sessions');
如何更改此查询工作?