-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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[HY093]: Invalid parameter number: parameter was not defined #523
Conversation
Creating Unit Tests to proof the behavior. Its my first PR and I don't know if I created the Unit Test in the right place. It was the location where the test actually writing to database which is needed provoke the error. DBAL-803 #Provides a test for this issue
Hello, thank you for creating this pull request. I have automatically opened an issue http://www.doctrine-project.org/jira/browse/DBAL-804 We use Jira to track the state of pull requests and the versions they got |
@Konafets We have a "bug" in the QB API that requires starting with parameters at |
Fixed in the docs. |
Thanks for taking care. I adjusted my test but I still get errors with the indexed needle syntax. 1) Doctrine\Tests\DBAL\Functional\WriteTest::testDeleteSetParameterPositionalAndIndex
Exception: [Doctrine\DBAL\Exception\SyntaxErrorException] An exception occurred while executing 'DELETE FROM write_table WHERE test_int = ?1' with params [2]:
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1' at line 1 When does it makes sense to use it? It seems like the index number is send directly to DB. Is this the correct way? |
Can someone explain how to bypass this issue with QB? For now my code looks like:
which sucks big time. |
@Ocramius named parameters does not work for me as well.
|
Creating Unit Tests to proof the behavior. Its my first PR and I
don't know if I created the Unit Test in the right place. It was the
location where the test actually writing to database which is needed
provoke the error.
DBAL-803 #Provides a test for this issue