Welcome Guest, Not a member yet? Register   Sign In
You must use the "set" method to update an entry on empty insert
#7

[eluser]Alsciende[/eluser]
For the record, I never argued with the fact that CI yelled at me. It was perfectly fine to yell at me, because what I was doing was wrong.

I just pointed out the fact that the error message was misleading, since it talked about an Update operation when I was asking for an Insert operation, and asked me to do a set that I was already doing (even if with an empty array, I was actually calling the set method). When you don't know what is wrong with your code and you're still trying to get used to a new (and great, btw, even if I'm a lot less enthusiastic now) framework, mistakes can be hard to detect. That's all. I was doing something wrong, and CI thrown an error that was arguably inaccurate - at least from a stupid user's point of view, since I'm sure there's a perfectly valid reason for this message.

edit: I did try $this->db->set($data)->insert('mytable'), even if I didn't mention it in the initial post.


Messages In This Thread
You must use the "set" method to update an entry on empty insert - by El Forum - 03-22-2011, 02:02 PM



Theme © iAndrew 2016 - Forum software by © MyBB