PageRenderTime 43ms CodeModel.GetById 17ms RepoModel.GetById 1ms app.codeStats 0ms

/MantisBT/library/adodb/drivers/adodb-pdo_mssql.inc.php

https://bitbucket.org/crypticrod/sr_wp_code
PHP | 61 lines | 40 code | 13 blank | 8 comment | 2 complexity | 32681e8aee1b921776567dc3c92765f2 MD5 | raw file
Possible License(s): AGPL-1.0, GPL-2.0, LGPL-2.1, GPL-3.0, LGPL-2.0, AGPL-3.0
  1. <?php
  2. /*
  3. V5.10 10 Nov 2009 (c) 2000-2009 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. ?>