Welcome Guest, Not a member yet? Register   Sign In
Insert if not exists possible with CI?
#11

[eluser]sophistry[/eluser]
oh, of course, actually, it is, as they say, "my bad" for not understanding you were referring to extending the mysql driver rather than hacking it (which seemed out-of-character advice from an experienced developer like you!) i've never heard the phrase "monkey patch" so i didn't catch it. i looked it up at wikipedia, here's a link for the curious: http://en.wikipedia.org/wiki/Monkey_patch the "pitfalls" section explains some problems with monkey-patching. it also indicates that the term refers to a range of modifications one can do.

but, after all wouldn't it be better to extend the model class (or look into one of the many fine model extensions available) than to re-jigger just one of the available db drivers... also, if you were to pursue a "monkey-patch" of any part of the DB core wouldn't it be the Active_rec.php file - the one that has insert and update functions already?




Theme © iAndrew 2016 - Forum software by © MyBB