我的查询中有一个很长的别名,但我认为它没有超出允许的限制。我正在使用 Postgres 数据库和 Yii 1.1.15。查询运行良好并返回正确的值,但我的结果切断了结果数组中的别名。
这是我的查询:
$query = Yii::app()->db->createCommand()
->select("mytable AS How many production lines at your company/division/location will require")
->from($table);
$result = $query->query();
我的结果如下所示:
$result = array(
array('How many production lines at your company/division/location wil' => string(18) "None/doesn't apply"),
array('How many production lines at your company/division/location wil' => string(18) "None"),
.....
);
请注意,我的结果数组的键是“贵公司/部门/位置将有多少条生产线”而不是“贵公司/部门/位置需要多少条生产线”