Skip to content

Commit 2a98e9c

Browse files
committed
Merge branch 'patch-1' of github.com:mrlnx/codeigniter-base-model into mrlnx-patch-1
Conflicts: core/MY_Model.php
2 parents 41b1c06 + 3389025 commit 2a98e9c

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

core/MY_Model.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -883,9 +883,17 @@ protected function _set_where($params)
883883
{
884884
$this->_database->where($params[0]);
885885
}
886+
else if(count($params) == 2)
887+
{
888+
$this->_database->where($params[0], $params[1]);
889+
}
890+
else if(count($params) == 3)
891+
{
892+
$this->_database->where($params[0], $params[1], $params[2]);
893+
}
886894
else
887895
{
888-
$this->_database->where($params[0], $params[1]);
896+
$this->_database->where($params);
889897
}
890898
}
891899

@@ -897,4 +905,4 @@ protected function _return_type($multi = FALSE)
897905
$method = ($multi) ? 'result' : 'row';
898906
return $this->_temporary_return_type == 'array' ? $method . '_array' : $method;
899907
}
900-
}
908+
}

0 commit comments

Comments
 (0)