Open Sect0R opened 6 years ago
I see the same issue.
Yii::$app->db->createCommand()->insert('user', ['type' => 'Admin'])->execute();
The above line of code shows error: "Field 'type' not exists in referenced class \yii\db\Query"
I see the same issue. PhpStorm 2020.2, plugin 0.10.57.23
Abandonware?
Because the code here is “@param array|Query"
You can modify it to
$insertColumns = [
'user_id' => 5
];
$data = Yii::$app->db->createCommand()->insert(self::tableName(), $insertColumns)->execute();
Field 'message.create_time' not exists in referenced class \yii\db\ExpressionInterface
谢谢
What steps will reproduce the problem?
create simple database request 3.\Yii::$app->db->createCommand()->insert('table', ['user_id' => 1])->execute();
What do you get instead?
Highlight error "field 'user_id' not exists in referenced class" in insert arguments
Additional info