SQLSTATE[HY093]: Invalid parameter number
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 50/100
Research direction
Start in yiisoft/db-mysql/src/Schema.php at loadTableForeignKeys and inspect the SQL query and its parameter bindings. Ensure the two schema-name placeholders are distinct and that the bindings match; the issue is done when PDO no longer reports SQLSTATE[HY093].
Written by the indexing model from the issue text.
Description
Description
yiisoft/db-mysql/src/Schema.php 文件的 loadTableForeignKeys 方法中,SQL 查询使用了同一个参数名 :schemaName 两次,一次在 WHEN 子句中,一次在 WHERE 子句中。这导致PDO在参数绑定时出现错误
yiisoft/db-mysql/src/Schema.php 文件中重复使用了同一个参数名 :schemaName
修改了SQL查询,将重复的参数名改为不同的名称 :schemaName1 和 :schemaName2
更新了参数绑定代码以匹配修改后的查询
Package version
No response
PHP version
No response
- Dominant language
- PHP
- Stars
- 42
- Forks
- 21
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from yiisoft/db-mysql
-
good first issue type:test
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
-
Load table checks Open
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
-
type:enhancement
-
status:under discussion type:enhancement
Difficulty 3/5 1-2 days Newbie friendliness 45/100
All issues in yiisoft/db-mysql
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
getgrav/grav-plugin-api#45 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
RSS-Bridge/rss-bridge#5098 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
phingofficial/phing#2025 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
silverstripe/developer-docs#911 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100