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

(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.
Reply


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, 10:57 AM
RE: Just found $this->db->replace() - by PaulD - 08-21-2015, 01:02 PM



Theme © iAndrew 2016 - Forum software by © MyBB