Server IP : 103.233.192.212 / Your IP : 18.191.102.140 Web Server : Apache/2 System : Linux sv1.inde.co.th 3.10.0-1160.36.2.el7.x86_64 #1 SMP Wed Jul 21 11:57:15 UTC 2021 x86_64 User : sumpatuan ( 1058) PHP Version : 5.5.38 Disable Function : symlink,shell_exec,exec,proc_close,proc_open,popen,system,dl,putenv,passthru,escapeshellarg,escapeshellcmd,pcntl_exec,proc_get_status,proc_nice,proc_terminate,pclose,ini_alter,virtual,openlog,ini_restore MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/sumpatuan/public_html/backup/framework/db/schema/mssql/ |
Upload File : |
<?php /** * CMssqlPdo class file * * @author Christophe Boulain <Christophe.Boulain@gmail.com> * @link http://www.yiiframework.com/ * @copyright 2008-2013 Yii Software LLC * @license http://www.yiiframework.com/license/ */ /** * This is an extension of default PDO class for mssql driver only * It provides some missing functionalities of pdo driver * @author Christophe Boulain <Christophe.Boulain@gmail.com> * @package system.db.schema.mssql */ class CMssqlPdoAdapter extends PDO { /** * Get the last inserted id value * MSSQL doesn't support sequence, so, argument is ignored * * @param string|null sequence name. Defaults to null * @return integer last inserted id */ public function lastInsertId ($sequence=NULL) { return $this->query('SELECT CAST(COALESCE(SCOPE_IDENTITY(), @@IDENTITY) AS bigint)')->fetchColumn(); } /** * Begin a transaction * * Is is necessary to override pdo's method, as mssql pdo drivers * does not support transaction * * @return boolean */ public function beginTransaction () { $this->exec('BEGIN TRANSACTION'); return true; } /** * Commit a transaction * * Is is necessary to override pdo's method, as mssql pdo drivers * does not support transaction * * @return boolean */ public function commit () { $this->exec('COMMIT TRANSACTION'); return true; } /** * Rollback a transaction * * Is is necessary to override pdo's method, ac mssql pdo drivers * does not support transaction * * @return boolean */ public function rollBack () { $this->exec('ROLLBACK TRANSACTION'); return true; } }