diff options
| -rw-r--r-- | docs/docs-adodb.htm | 2 | ||||
| -rw-r--r-- | drivers/adodb-sybase.inc.php | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/docs/docs-adodb.htm b/docs/docs-adodb.htm index 5b90e982..2da777f5 100644 --- a/docs/docs-adodb.htm +++ b/docs/docs-adodb.htm @@ -6210,6 +6210,8 @@ PHP</a>. </p> <p>postgres8: New class/type with correct behavior for _insertid(). See Github #8 <p>postgres9: Fixed assoc problem. See http://phplens.com/lens/lensforum/msgs.php?id=19296 <p>sybase: Removed redundant sybase_connect() call in _connect(). See Github #3 +<p>sybase: Allow connection on custom port. See Github #9 +<p>sybase: Fix null values returned with ASSOC fetch mode. See Github #10 <p>Added Composer support. See Github #7 <p><a name=5.18><b>5.18 3 Sep 2012</b> diff --git a/drivers/adodb-sybase.inc.php b/drivers/adodb-sybase.inc.php index 777c793a..18d4aebf 100644 --- a/drivers/adodb-sybase.inc.php +++ b/drivers/adodb-sybase.inc.php @@ -40,6 +40,8 @@ class ADODB_sybase extends ADOConnection { var $leftOuter = '*='; var $rightOuter = '=*'; + var $port; + function ADODB_sybase() { } @@ -123,6 +125,11 @@ class ADODB_sybase extends ADOConnection { { if (!function_exists('sybase_connect')) return null; + // Sybase connection on custom port + if ($this->port) { + $argHostname .= ':' . $this->port; + } + if ($this->charSet) { $this->_connectionID = sybase_connect($argHostname,$argUsername,$argPassword, $this->charSet); } else { @@ -139,6 +146,11 @@ class ADODB_sybase extends ADOConnection { { if (!function_exists('sybase_connect')) return null; + // Sybase connection on custom port + if ($this->port) { + $argHostname .= ':' . $this->port; + } + if ($this->charSet) { $this->_connectionID = sybase_pconnect($argHostname,$argUsername,$argPassword, $this->charSet); } else { @@ -341,7 +353,8 @@ class ADORecordset_sybase extends ADORecordSet { if ($this->fetchMode == ADODB_FETCH_NUM) { $this->fields = @sybase_fetch_row($this->_queryID); } else if ($this->fetchMode == ADODB_FETCH_ASSOC) { - $this->fields = @sybase_fetch_row($this->_queryID); + $this->fields = @sybase_fetch_assoc($this->_queryID); + if (is_array($this->fields)) { $this->fields = $this->GetRowAssoc(ADODB_ASSOC_CASE); return true; |
