Home » Database » DB » Bug #3659
Bugs pear-DB with mssql on FreeBSD-ports
Details
| Submitted | 2005-03-01 10:53 UTC |
|---|---|
| From | lecha at mambursoft dot org dot ua |
| Assigned | danielc |
| Status | No Feedback |
| Package | DB |
| PHP Version | 5.0.3 |
| OS | FreeBSD 5.3 |
| Roadmaps | (Not assigned) |
Comments
[2005-03-01 10:53 UTC] lecha at mambursoft dot org dot ua
Description:
------------
1. On connect.
< $dbhost .= $dsninfo['port'] ? ':' .
$dsninfo['port'] : '';
---
> $dbhost .= $dsninfo['port'] ? ',' .
$dsninfo['port'] : '';
Replace please "," to ":"
2. On Error.
Alert error without error!
Reproduce code:
---------------
1. On connect.
< $dbhost .= $dsninfo['port'] ? ':' . $dsninfo['port'] : '';
---
> $dbhost .= $dsninfo['port'] ? ',' . $dsninfo['port'] : '';
Replace please "," to ":"
2. On Error.
Alert error without error!
Fix /usr/local/share/pear/DB/mssql.php:
function simpleQuery($query)
{
$ismanip = DB::isManip($query);
$this->last_query = $query;
if (!@mssql_select_db($this->_db, $this->connection)) {
return $this->mssqlRaiseError(DB_ERROR_NODBSELECTED);
}
$query = $this->modifyQuery($query);
if (!$this->autocommit && $ismanip) {
if ($this->transaction_opcount == 0) {
$result = @mssql_query('BEGIN TRAN', $this->connection);
if (!$result) {
return $this->mssqlRaiseError();
}
}
$this->transaction_opcount++;
}
$result = @mssql_query($query, $this->connection);
// My edition !!!!!!!!!!!!!!!!
if ($this->errorNative()){
// if (!$result) {
return $this->mssqlRaiseError();
// }
}
// Determine which queries that should return data, and which
// should return an error code only.
return $ismanip ? DB_OK : $result;
}