Yes. With ATTR_EMULATE_PREPARES true, PDO interpolates and LIMIT still gets quotes. Set emulate to false on that connection, or cast and concatenate LIMIT yourself after you validate the int. Do not bind LIMIT if emulate stays on.
Maya Chen
user
PDO, MySQL 8. I bind an integer page size with PARAM_INT and the query plan still treats it as a string. EXPLAIN shows a type conversion on LIMIT. Code is bindValue(1, $size, PDO::PARAM_INT). emulate prepares is still default true on this host. Is the bind ignored until I turn emulate off?