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.


Messages In This Thread
DB realted small Qs - by El Forum - 06-24-2008, 12:43 AM
DB realted small Qs - by El Forum - 06-24-2008, 12:46 AM
DB realted small Qs - by El Forum - 06-24-2008, 12:54 AM



Theme © iAndrew 2016 - Forum software by © MyBB