【发布时间】:2012-10-16 11:37:13
【问题描述】:
有人知道如何在 PHP symfony1.4 中处理数据库视图吗?
我在数据库中手动创建了一个视图“ABC”。 现在,我想从该视图“ABC”中选择记录,并在查询中添加 where 子句。 如果可能的话,举个例子。
编辑:
我的架构是:
Product:
columns:
name: { type: string(127), notnull: true }
launch_date: { type: date }
price: { type: integer }
status_id: { type: integer }
ProductLocation :
product_id: { type: integer }
name: { type: string(50) }
launch_date: { type: date }
relations:
Product: {onDelete: RESTRICT, local: product_id, foreign: id, foreignAlias: "Products" }
我想为两个表的联合创建视图。 谢谢
【问题讨论】:
标签: php symfony-1.4 doctrine-1.2 sql-view