开发者

mySQL vs. sqlite alias incompatible?

I use Yii framework with mySQL with an ORM. When I switch to sqlite, I 开发者_StackOverflow中文版suddenly get 'column not found' errors for columns that have aliases in their query:

Querying SQL: SELECT `privateAccesses`.`project_id` AS `t1_c0`, ... FROM `project` `privateAccesses`

Then I get:

CDbException: CDbCommand failed to prepare the SQL statement: SQLSTATE[HY000]: General error: 1 no such column: privateAccesses

So I think it has something to do with aliases.. anyone know if the mySQL/sqlite aliases are somehow incompatible? Idea how to fix this? Basic aliases seem to work in sqlite..

Thanks, MrB


Forget it, it's something about the ORM omitting certain columns on sqlite for some reason..

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜