Just found $this->db->replace() |
(08-05-2015, 10:22 AM)ivantcholakov Wrote: http://code.openark.org/blog/mysql/repla...hink-twice I tend to make use of it on tables used to store multilanguage content. As with site pages, for instance. They usually have a structure with UNIQUE (article_id, lang) plus title, content, etc. , where article_id is a forein key for an articles table and lang is the language code, so a REPLACE INTO will not break any relation on the database. Those tables have no primary keys themselves. |
Messages In This Thread |
Just found $this->db->replace() - by PaulD - 07-24-2015, 10:22 AM
RE: Just found $this->db->replace() - by josetrindade - 08-05-2015, 09:10 AM
RE: Just found $this->db->replace() - by ivantcholakov - 08-05-2015, 10:22 AM
RE: Just found $this->db->replace() - by josetrindade - 08-05-2015, 10:57 AM
RE: Just found $this->db->replace() - by PaulD - 08-21-2015, 01:02 PM
|