Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLSTATE[HY000] #18

Open
EndErr opened this issue Apr 25, 2018 · 3 comments
Open

SQLSTATE[HY000] #18

EndErr opened this issue Apr 25, 2018 · 3 comments
Assignees

Comments

@EndErr
Copy link

EndErr commented Apr 25, 2018

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.

@marcinmisiak
Copy link

marcinmisiak commented Jan 14, 2021

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!

@edgardmessias
Copy link
Owner

Sorry, but I haven't used Yii2 or firebird in a long time, but pull requests are welcome

@marcinmisiak
Copy link

BUG was in PHP8.0 , after upgrade PHP to PHP 8.0.2 parameters name with "_" work perfect

@edgardmessias edgardmessias self-assigned this Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants