Welcome Guest, Not a member yet? Register   Sign In
Database Helper & Conditions
#4

[eluser]InsiteFX[/eluser]
If you can not do any of the above then you can try this!
Code:
$this->db->where('user_id', $user_id);
$query = $this->db->get('membership');

if ($query->num_rows() == 0)
{
    // the user_id does not exist.
}
else
{
   // the user_id exists so create a new one
}

InsiteFX


Messages In This Thread
Database Helper & Conditions - by El Forum - 04-11-2011, 05:22 PM
Database Helper & Conditions - by El Forum - 04-11-2011, 07:59 PM
Database Helper & Conditions - by El Forum - 04-12-2011, 01:50 PM
Database Helper & Conditions - by El Forum - 04-12-2011, 04:13 PM



Theme © iAndrew 2016 - Forum software by © MyBB