Welcome Guest, Not a member yet? Register   Sign In
DB realted small Qs
#1

[eluser]Yash[/eluser]
Code:
$data = array(
               'Activate' => 1,
               'CheckCode' => ""
            );

            
    $this->db->where(array('MemberID'=> $id,'CheckCode'=> $act_code));
    $str1 =$this->db->update('users', $data);

this works perfectly.

but problem is each time $str1 gives 1 whether it updates or not .

My question how to do this also know whether query is successful or not.
#2

[eluser]xwero[/eluser]
$this->db->affected_rows()
#3

[eluser]Yash[/eluser]
You always rocks Smile

Thank you man....I'll try




Theme © iAndrew 2016 - Forum software by © MyBB