Welcome Guest, Not a member yet? Register   Sign In
what is the results from $this->db->delete()
#4

[eluser]dcbartlett[/eluser]
if anyone has a better solution than:

function delete_record($table, $id)
{

$d = $this->db->get_where($table, array('id' => $id));
if ($d->result()) {
$this->db->where('id',$id);
$this->db->delete($table);
return 1;
} else {
return 0;
}
}

Please let me know


Messages In This Thread
what is the results from $this->db->delete() - by El Forum - 11-29-2009, 04:59 PM
what is the results from $this->db->delete() - by El Forum - 11-29-2009, 06:46 PM
what is the results from $this->db->delete() - by El Forum - 11-29-2009, 07:18 PM
what is the results from $this->db->delete() - by El Forum - 11-29-2009, 07:27 PM
what is the results from $this->db->delete() - by El Forum - 11-30-2009, 01:11 AM
what is the results from $this->db->delete() - by El Forum - 11-30-2009, 01:27 AM
what is the results from $this->db->delete() - by El Forum - 11-30-2009, 05:52 AM
what is the results from $this->db->delete() - by El Forum - 11-30-2009, 11:12 PM



Theme © iAndrew 2016 - Forum software by © MyBB