プロパティという名前のテーブルがあります。このテーブル内の "hold=1" に一致するすべてのレコードを取得したいのですが、別のテーブルにさまざまな言語のプロパティ名が保持されています。
テーブル プロパティ:
pid hold
property_translations:
pid lang_id pname description isDefault
私は通常、共用体を使用して言語を取得します
(select pname from property_translations where lang_id='en' and pid=$pid)
union
(select pname from property_translations where isDefault='Yes' and pid=$pid)
limit 1