public function write($stmt, $params = array()) { $db = $this->dbMaster; if (is_array($params)) { $obj = $this->query($db, $stmt, $params); return $obj->rowCount(); } else { return $this->exec($db, $stmt); } }