CMS Translation Systen: DB Desiging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi everone,

I am building a multilingual content management systen, and I am studying the best way 
to have the content translated, with minimal Database queries and load. 

So I have:

CONTENTS
contentId
contentCreationDate
contentModificationDate
translationId
contentStatus

CATEGORIES
categoryId
categoryParentId
categoryModulePath
translationId
categoryStatus

TRANSLATIONS
translationId
field01
field02
field03
field04
field05
field06
field07
field08
field09
field10
translationLanguage
translationStatus

So just run a simple join query:
SELECT contents.*,translations.* FROM contents,translations WHERE 
contents.translationId=translations.translationId AND 
translations.translationLanguage='en-uk' AND translations.translationStatus = 1

Or with categories:
SELECT categories.*,translations.* FROM categories,translations WHERE 
categories.translationId=translations.translationId AND 
translations.translationLanguage='en-uk' AND translations.translationStatus = 1 AND 
categories.categoryModulePath='products'


Any better idea to handle that?

Regards,
Bruno B B Magalhaes

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux