This commit is contained in:
2017-12-27 13:46:56 +01:00
parent 0cc882060c
commit 73d95c3daf
22 changed files with 641 additions and 6 deletions
+15
View File
@@ -23,4 +23,19 @@ class User_model extends MY_Model {
return $user;
}
public function checkUnique($recordID, $field, $fieldValue)
{
$this->sql = "
SELECT *
FROM users
WHERE ucase( {$field} ) = '{strtoupper($fieldValue)}'
AND id != {$recordID} ";
$result = $this->get_query_row();
if( ! $result ) return TRUE;
return FALSE;
}
}