PageRenderTime 36ms CodeModel.GetById 11ms RepoModel.GetById 0ms app.codeStats 0ms

/lib/adodb/drivers/adodb-pdo_mssql.inc.php

https://bitbucket.org/synergylearning/campusconnect
PHP | 61 lines | 40 code | 13 blank | 8 comment | 2 complexity | 39a95a1663abfdbde8f589b7aff4c375 MD5 | raw file
Possible License(s): MPL-2.0-no-copyleft-exception, LGPL-3.0, GPL-3.0, LGPL-2.1, Apache-2.0, BSD-3-Clause, AGPL-3.0
  1. <?php
  2. /*
  3. V5.18 3 Sep 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
  4. Released under both BSD license and Lesser GPL library license.
  5. Whenever there is any discrepancy between the two licenses,
  6. the BSD license will take precedence.
  7. Set tabs to 8.
  8. */
  9. class ADODB_pdo_mssql extends ADODB_pdo {
  10. var $hasTop = 'top';
  11. var $sysDate = 'convert(datetime,convert(char,GetDate(),102),102)';
  12. var $sysTimeStamp = 'GetDate()';
  13. function _init($parentDriver)
  14. {
  15. $parentDriver->hasTransactions = false; ## <<< BUG IN PDO mssql driver
  16. $parentDriver->_bindInputArray = false;
  17. $parentDriver->hasInsertID = true;
  18. }
  19. function ServerInfo()
  20. {
  21. return ADOConnection::ServerInfo();
  22. }
  23. function SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0)
  24. {
  25. $ret = ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache);
  26. return $ret;
  27. }
  28. function SetTransactionMode( $transaction_mode )
  29. {
  30. $this->_transmode = $transaction_mode;
  31. if (empty($transaction_mode)) {
  32. $this->Execute('SET TRANSACTION ISOLATION LEVEL READ COMMITTED');
  33. return;
  34. }
  35. if (!stristr($transaction_mode,'isolation')) $transaction_mode = 'ISOLATION LEVEL '.$transaction_mode;
  36. $this->Execute("SET TRANSACTION ".$transaction_mode);
  37. }
  38. function MetaTables($ttype=false,$showSchema=false,$mask=false)
  39. {
  40. return false;
  41. }
  42. function MetaColumns($table,$normalize=true)
  43. {
  44. return false;
  45. }
  46. }
  47. ?>