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

[eluser]jedd[/eluser]
Hi dcbartlett and welcome to the CI forums.

[quote author="dcbartlett" date="1259557146"]
I'm trying to find what the default results from $this->db->delete() are.
[/quote]

One of the handy features of CI is that, by definition, you have access to the source.

Reading through system/database/DB_active_rec.php is somewhat instructive here, once you get down to the delete() function.

The doc block isn't hugely helpful, as it just tells us the the return type is an object. There are five return lines in that function, variously returning boolean, the output of display_error(), nothing, or this->query($sql).

So .. take your pick Smile

Quote:i'm trying to achieve the ability to tell a user that a record does not exist when they try to delete it.

I'd suggest you may need to write a check function first to confirm the element exists, and possibly another afterwards to confirm the element doesn't.


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