Welcome Guest, Not a member yet? Register   Sign In
How to find query executed successfully or not?
#1

[eluser]Unknown[/eluser]
Hi

This is the query im working on

Code:
$result = $this->db->update( 'users', $data, array('UserName' => $_POST["UserName"]) );
if($result == FALSE){
     echo "fail";
}else{
     echo "success";
}

what i want to do is execute query then display success if its executed correctly or fail if it isn't

lets say if im trying to update a username that not exist on database, this still gives me success

probably im doing this wrong.

any idea how to do this correctly?

Sorry for the bad english


Regards




Theme © iAndrew 2016 - Forum software by © MyBB