fix missing () from num_rows calls
这个提交包含在:
父节点
e384826aea
当前提交
73e0f1d7d1
共有 2 个文件被更改,包括 27 次插入 和 27 次删除
|
|
@ -185,7 +185,7 @@ class API extends CI_Controller {
|
|||
|
||||
// Cycle through the results, and translate between MySQL column names
|
||||
// and more friendly, descriptive names
|
||||
if($results->num_rows != 0)
|
||||
if($results->num_rows() != 0)
|
||||
{
|
||||
foreach ($results->result() as $row) {
|
||||
$record = (array)$row;
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ class User_Model extends CI_Model {
|
|||
// FUNCTION: bool exists($username)
|
||||
// Check if a user exists (by username)
|
||||
function exists($username) {
|
||||
if($this->get($username)->num_rows == 0) {
|
||||
if($this->get($username)->num_rows() == 0) {
|
||||
return 0;
|
||||
} else {
|
||||
return 1;
|
||||
|
|
@ -56,7 +56,7 @@ class User_Model extends CI_Model {
|
|||
// FUNCTION: bool exists_by_id($id)
|
||||
// Check if a user exists (by user ID)
|
||||
function exists_by_id($id) {
|
||||
if($this->get_by_id($id)->num_rows == 0) {
|
||||
if($this->get_by_id($id)->num_rows() == 0) {
|
||||
return 0;
|
||||
} else {
|
||||
return 1;
|
||||
|
|
@ -66,7 +66,7 @@ class User_Model extends CI_Model {
|
|||
// FUNCTION: bool exists_by_email($email)
|
||||
// Check if a user exists (by email address)
|
||||
function exists_by_email($email) {
|
||||
if($this->get_by_email($email)->num_rows == 0) {
|
||||
if($this->get_by_email($email)->num_rows() == 0) {
|
||||
return 0;
|
||||
} else {
|
||||
return 1;
|
||||
|
|
|
|||
正在加载…
在新工单中引用