Php Prepared Statements Turn Emulation Off
问题 Are there any side effects to turning off emulation when using prepared statements with pdo? I'm using a select * and limiting the results which needs to be handled as an int and not a string. I can do one of two things. $conn->setAttribute( PDO::ATTR_EMULATE_PREPARES, false ); Or to bind these variables explicitly with param type: $stm = $pdo->prepare('SELECT * FROM table LIMIT ?, ?'); $stm->bindParam(1, $limit_from,PDO::PARAM_INT); $stm->bindParam(2, $per_page,PDO::PARAM_INT); $stm->execute