The aim was to prepare and insert a lot of data at once. "Lots of data" means more than 65535 parameters in one query.
So on $pdo->execute() the error from the title is rised.
I read all about similar errors on SO, but everything is about other cases.
So the problem is in PDO.
PDO stores count of query parameters in the unsigned int, so it can't operate more than 65535 parameters at once.
To workaround this restriction you need to divide your query.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With