yii2-firebird
yii2-firebird copied to clipboard
SQLSTATE[HY000]
From this morning I started to get that error on model->save():
SQLSTATE[HY000]: General error: -104 Dynamic SQL Error SQL error code = -104 Unexpected end of command - line 1, column 1
From SQLSTATE Error Codes and Descriptions it says that it is a
CLI-specific condition Nothing was changed in the system (using CentOS 6.9, php 7.1, pdo-firebird).
After some testing I found that the problem is in Schema::insert method. Not having much time to dig dipper I reverted this method to a older and averything works, but not fixed.
PHP 8.0 Yii2 2.40 When use Firebird PROCEDURE i have the same error: SQLSTATE[HY000]: General error: -104 Dynamic SQL Error SQL error code = -104 Unexpected end of command - line 1
Did you test yii2-firebird + PHP8?
oh if name param is witch "_" there error eg.: :stud_id When change to: :studid work ok, so:
\Yii::$app->db->createCommand( "select wynik from cz_dajzaleglosc(:stud_id, :data_od, :data_do, 2)", [ "stud_id" => 56286, "data_od" => "$data_od", "data_do" => "$data_do" ] )->queryOne();
- give error: SQLSTATE[HY000]: General error: -104 Dynamic SQL Error SQL error code = -104 Token unknown - line 1, column 36 _id Failed to prepare SQL: select wynik from cz_dajzaleglosc(:stud_id, :dataod, :datado, 2)
CODE: \Yii::$app->db->createCommand( "select wynik from cz_dajzaleglosc(:studid, :dataod, :datado, 2)", [ "studid" => 56286, "dataod" => "$data_od", "datado" => "$data_do" ] )->queryOne(); Work ok!
Sorry, but I haven't used Yii2 or firebird in a long time, but pull requests are welcome
BUG was in PHP8.0 , after upgrade PHP to PHP 8.0.2 parameters name with "_" work perfect