fatkatie Posted September 12, 2019 Share Posted September 12, 2019 (edited) (every site should have a win10 update section) mysql/php-pdo/xampp insert constructs are suddenly failing (running fine for a year) after an overnight update. Here's the error code. error code: HY093 error msg: SQLSTATE[HY093]: Invalid parameter number: parameter was not defined binding: Array I'm chasing it (cut this part out.....cut that part out) but while I'm doing this I thought I'd see if anyone else is having this experience mysql Ver 15.1 Distrib 10.1.38-MariaDB, for Win64 (AMD64), win10 pro, 1903, 18362.356 Thank you Edited September 12, 2019 by fatkatie Quote Link to comment Share on other sites More sharing options...
requinix Posted September 12, 2019 Share Posted September 12, 2019 It's extremely unlikely that a Windows update broke this. Something else happened. 1 Quote Link to comment Share on other sites More sharing options...
benanamen Posted September 12, 2019 Share Posted September 12, 2019 That error could not have happened from a windows update. Post the code. Quote Link to comment Share on other sites More sharing options...
mac_gyver Posted September 12, 2019 Share Posted September 12, 2019 the error is because there are a different number of place-holders in an sql query statement compared with the number of values supplied when the query is executed. the solution would be to find out why that is happening and correct it. it's likely that the computer restart as part of the win update either committed or lost some unsaved change in a server setting or in a code file. Quote Link to comment Share on other sites More sharing options...
fatkatie Posted September 12, 2019 Author Share Posted September 12, 2019 It appears the binding is not allowing empty fields. But why now. The strict is off (or was). in toad's window I can write these two inserts. The first fails. The second does not. insert into info (infoid, infoindex values ('', ''); insert into info (infoid, infotext) value (null, null); both fields are default null. both are ints. C:\xampp\htdocs\csc> mysql -e "SELECT @@sql_mode;" +--------------------------------------------+ | @@sql_mode | +--------------------------------------------+ | NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION | +--------------------------------------------+ Also checked the table. Practice aside, this was working yesterday. . Quote Link to comment Share on other sites More sharing options...
Barand Posted September 12, 2019 Share Posted September 12, 2019 An empty string is not, and AFAIK never has been, a valid integer value mysql> CREATE TABLE test99 (id int, val varchar(20) ); Query OK, 0 rows affected (0.32 sec) mysql> INSERT INTO test99 VALUES ('',''); ERROR 1366 (HY000): Incorrect integer value: '' for column 'id' at row 1 Quote Link to comment Share on other sites More sharing options...
fatkatie Posted September 12, 2019 Author Share Posted September 12, 2019 All is well. Typo. Working as before. Really thou, is it possible to nuke this post. This was a bogus claim and will just add to the windows update noise. Thanks all for your help. Only took 4 hours to find it. @#$!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.