Welcome Guest, Not a member yet? Register   Sign In
how to use IS NULL?
#1

Hi,

I have problem with my query, its not update my table

*I want select NULL col with limit then update the DB.

this is my code model:

PHP Code:
function SetUserTakenStock($data$id$totalTaken)
 
 {
 
   $this->db->trans_start();
 
   $this->db->select('*');
 
   $this->db->from('user_id');
 
   $this->db->where('status IS NULL');
 
   $this->db->set('status'$data);
 
   $this->db->where('user_id'$id);
 
   $this->db->limit($totalTaken);
 
   $this->db->update('gen_set');

 
   $this->db->trans_complete();
 
   if ($this->db->trans_status() === TRUE)
 
   {
 
     return true;
 
   }
 
   else
    
{
 
     return false;
 
   }
 
 
This is me. JK not me.
Reply


Messages In This Thread
how to use IS NULL? - by falcon812311 - 04-08-2017, 09:37 PM
RE: how to use IS NULL? - by janudewangga - 04-09-2017, 01:14 AM
RE: how to use IS NULL? - by dave friend - 04-09-2017, 11:44 AM



Theme © iAndrew 2016 - Forum software by © MyBB