diff options
Diffstat (limited to 'lib/Minz/PdoMysql.php')
| -rw-r--r-- | lib/Minz/PdoMysql.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/Minz/PdoMysql.php b/lib/Minz/PdoMysql.php new file mode 100644 index 000000000..3c5aa057c --- /dev/null +++ b/lib/Minz/PdoMysql.php @@ -0,0 +1,21 @@ +<?php + +/** + * MINZ - Copyright 2011 Marien Fressinaud + * Sous licence AGPL3 <http://www.gnu.org/licenses/> + */ + +class Minz_PdoMysql extends MinzPdo { + public function __construct($dsn, $username = null, $passwd = null, $options = null) { + parent::__construct($dsn, $username, $passwd, $options); + $this->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, false); + } + + public function dbType() { + return 'mysql'; + } + + public function lastInsertId($name = null) { + return parent::lastInsertId(); //We discard the name, only used by PostgreSQL + } +} |
