13 lines
316 B
SQL
13 lines
316 B
SQL
CREATE OR REPLACE DEFINER=`vn`@`localhost`
|
|
SQL SECURITY DEFINER
|
|
VIEW `vn`.`itemCategoryL10n`
|
|
AS SELECT `c`.`id` AS `id`,
|
|
IFNULL(`i`.`name`, `c`.`name`) AS `name`
|
|
FROM (
|
|
`vn`.`itemCategory` `c`
|
|
LEFT JOIN `vn`.`itemCategoryI18n` `i` ON(
|
|
`i`.`categoryFk` = `c`.`id`
|
|
AND `i`.`lang` = `util`.`lang`()
|
|
)
|
|
)
|