luoxiao
- luoxiao 2016-03-16 已签到连续签到2天,获得了10个金钱
- luoxiao 2016-03-15 已签到连续签到1天,获得了5个金钱
- luoxiao 回复了话题 PHP开发中最常见的10个错误
确实犯过类似的错误
- luoxiao 收藏了话题PHP开发中最常见的10个错误
- luoxiao 赞了回答
检查是否使用了innodb存储引擎
- luoxiao 赞了回答
看着多了个空格。加上引号,或者把空格去掉,应该就可以了。
- luoxiao 赞了回答
yii\db\Command.php
里面在createCommand的时候,会默认用bindValue对参数进行处理,所以你可以放心的用上述写法而不用担心注入问题。/** * Binds pending parameters that were registered via [[bindValue()]] and [[bindValues()]]. * Note that this method requires an active [[pdoStatement]]. */ protected function bindPendingParams() { foreach ($this->_pendingParams as $name => $value) { $this->pdoStatement->bindValue($name, $value[0], $value[1]); } $this->_pendingParams = []; }