Welcome Guest, Not a member yet? Register   Sign In
Just found $this->db->replace()

(This post was last modified: 08-21-2015, 01:06 PM by PaulD.)

(08-05-2015, 10:22 AM)ivantcholakov Wrote: http://code.openark.org/blog/mysql/repla...hink-twice

Interesting read - thank you.

Having used the function now, even given the warnings and usage limitations about auto increments changing and possible overhead, it is still a fantastic function IMHO. Has made so many bits of my code so much cleaner to read, although my initial excitement of the function was somewhat abated given the usage limitations.

I agree that a replace_batch would be great, although in fairness I have not had the need for it yet.

Best wishes,


PS The tables I have used it on had no primary key either. I have not experienced any real problems with that given the circumstances and use of the tables in question, although it did feel a bit strange at first not having one, and phpmyadmin doesn't allow inline editing of table content without one which was a bit of a pain during development.

Messages In This Thread
Just found $this->db->replace() - by PaulD - 07-24-2015, 10:22 AM
RE: Just found $this->db->replace() - by PaulD - 08-21-2015, 01:02 PM

Theme © iAndrew 2016 - Forum software by © MyBB