FAQ
Edit report at https://pear.php.net/bugs/bug.php?id=19231&edit=1

ID: 19231
Updated by: daniel.oconnor@gmail.com
Reported By: sentok23 at gmail dot com
Summary: Call to undefined function odbc_get_last_message()
-Status: Open
+Status: Closed
Type: Bug
Package: MDB2_Driver_odbc
Operating System: Ubuntu 11.04
Package Version: 0.1.0
PHP Version: 5.3.5
-Assigned To:
+Assigned To: doconnor
Roadmap Versions:
New Comment:

-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: doconnor
This bug has been fixed in SVN.

If this was a documentation problem, the fix will appear on pear.php.net
by the end of next Sunday (CET).

If this was a problem with the pear.php.net website, the change should
be live shortly.

Otherwise, the fix will appear in the package's next release.

Thank you for the report and for helping us make PEAR better.




Previous Comments:
------------------------------------------------------------------------

[2012-01-18 14:49:11] cklein13

Description:
------------
In "MDB2/Driver/odbc.php" on line 97 there is this call:

$native_msg = @odbc_get_last_message();

But that particular function does not exist at the moment and IMHO never
existed at any time. The correct function is "odbc_errormsg()" instead
(http://php.net/manual/en/function.odbc-errormsg.php).

The author does already provide some wrapper functions at the head of
"odbc.php":

function odbc_query($query, $connection) {
return odbc_do($connection, $query);
}
function odbc_fetch_row_wrapper($result) {
return @array_values(odbc_fetch_array($result));
}
function odbc_fetch_assoc ($result){
return odbc_fetch_array($result);
}

Thus one possible solution would be to provide one further wrapper
function:

function odbc_get_last_message() {
if (function_exists("odbc_errormsg")) {
return odbc_errormsg();
}
}

As a workaround people could define that wrapper function within their
application code before invoking MDB2-methods.

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedJan 23, '12 at 9:33p
activeJan 23, '12 at 9:33p
posts1
users1
websitepear.php.net

1 user in discussion

Daniel Oconnor: 1 post

People

Translate

site design / logo © 2021 Grokbase