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

[eluser]xwero[/eluser]
You can do a check
Code:
function value_exists($table,$field,$value)
{
     return ($this->db->from($table)->where($field,$value)->count_all_results() == 0)?FALSE:TRUE;
}


Messages In This Thread
validate if category exist before insert ? - by El Forum - 06-17-2008, 11:28 PM
validate if category exist before insert ? - by El Forum - 06-18-2008, 12:32 AM
validate if category exist before insert ? - by El Forum - 07-16-2008, 09:56 AM



Theme © iAndrew 2016 - Forum software by © MyBB