[eluser]terry101[/eluser]
jblack199 i tried what you suggested but no dice. Mirge the 1 was always included and no dice either. Any other suggestions on what could be possibly wrong?
Code:
function dbcheck ($username) {
$checkusername = array('username' => $username);
$verifyusername = $this->db->get_where('tbregister', $checkusername);
var_dump($verifyusername);
//$this->db->where('username', $username);
//$verifyusername = $this->db->get('tbregister');
if ($verifyusername->num_rows() == 1) {
$this->form_validation->set_message('dbcheck','%s already exists!');
return FALSE;
}
else {
return TRUE;
}
}
i tried var_dump($verifyusername); and i get nothin below, so nothing getting passes?
object(CI_DB_mysql_result)[17]
public 'conn_id' => resource(29, mysql link persistent)
public 'result_id' => resource(34, mysql result)
public 'result_array' =>
array
empty
public 'result_object' =>
array
empty
public 'custom_result_object' =>
array
empty
public 'current_row' => int 0
public 'num_rows' => int 16
public 'row_data' => null