Welcome Guest, Not a member yet? Register   Sign In
Form Validation is_unique issue
#1

(This post was last modified: 05-25-2015, 11:47 AM by tj_gumis.)

Hi,

To make a long story short. This is the body of the function :
PHP Code:
   public function is_unique($str$field)
 
   {
 
       sscanf($field'%[^.].%[^.]'$table$field);

 
       return isset($this->CI->db)
 
           ? ($this->CI->db->limit(1)->get_where($table, array($field => $str))->num_rows() === 0)
 
           FALSE;
 
   

and it doesn't work in my case. Does not matter what is the real situation :
PHP Code:
       return isset($this->CI->db)... 

throws an error.
If instead of isset() I use is_object() - works fine. What is a reason of such a behavior ?
Reply


Messages In This Thread
Form Validation is_unique issue - by tj_gumis - 05-25-2015, 11:45 AM
RE: Form Validation is_unique issue - by CroNiX - 05-25-2015, 12:35 PM
RE: Form Validation is_unique issue - by tj_gumis - 05-25-2015, 12:55 PM
RE: Form Validation is_unique issue - by jinbatsu - 10-06-2015, 10:09 PM



Theme © iAndrew 2016 - Forum software by © MyBB