catfan / Medoo

The lightweight PHP database framework to accelerate the development.
https://medoo.in
MIT License
4.84k stars 1.15k forks source link

Warning: PDOStatement::execute(): SQLSTATE[HY093]: Invalid parameter number.. #630

Closed turbopixel closed 7 years ago

turbopixel commented 7 years ago

I update from Medoo 1.2.1 to 1.4.5.

The database query no longer works:

$language = "en";
$result = $Medoo->get("language", ["lang", "id"], ["langShort" => $language]);

Error Message:

Warning: PDOStatement::execute(): SQLSTATE[HY093]: Invalid parameter number: no parameters were bound in /var/www/shop/vendor/catfan/medoo/src/Medoo.php on line 308

Query output:

[sql] => SELECT lang,id FROM language WHERE langShort = :MeDoO_0_mEdOo LIMIT 1
catfan commented 7 years ago

What was your debug() ouput?

$Medoo->debug()->get("language", ["lang", "id"], ["langShort" => $language]);
turbopixel commented 7 years ago

I can't reproduce the mistake. If the problem should occur again, I reopen this issue.