Welcome Guest, Not a member yet? Register   Sign In
validate if category exist before insert ?

hi, is me again Big Grin

how i'll know if the category exist before that i save in the table of my DDBB??

Thanks Smile

You can do a check
function value_exists($table,$field,$value)
     return ($this->db->from($table)->where($field,$value)->count_all_results() == 0)?FALSE:TRUE;

Thanks Smile

Theme © iAndrew 2016 - Forum software by © MyBB