ODBC

From: Date: Mon, 29 Jan 2001 13:38:49 +0000
Subject: ODBC
Groups: php.pear 
Request: Send a blank email to php-pear+get-1206@lists.php.net to get a copy of this message
Hi. I noticed that DB_FETCHMODE_ASSOC is emulated in the ODBC module: } else if ($fetchmode == DB_FETCHMODE_ASSOC) { for ($i = 0; $i < count($row); $i++) { $colName = odbc_field_name($result, $i+1); $a[$colName] = $row[$i]; However, odbc_fetch_assoc() is mentioned as a prototype in http://zend.com/phpfunc/function.odbc_fetch_array.php, but does not seem to be implemented yet. I don't why this is the case, but wouldn't it be smarter to implement the DB_FETCHMODE_ASSOC behaviour in the PHP extension instead of in PEAR as far as performance is concerned? Stig? Also (while we're at it) I feel it is rather awkward that it is impossible to retrieve the error messages from ODBC for use in the PHP application. I know that the error message from the database is available to PHP as it shows up as a warning if I don't set my error_reporting properly. It seems someone was about to implement my saviour odbc_errormsg() (http://zend.com/phpfunc/function.odbc_errormsg.php), but didn't finish... I am convinced that odbc_errormsg() is rather trivial to implement -- unfortunately I am really no wizard when it comes to C, so I'm afraid I wont be able to do it myself... Stig...? :-) /Christian

« previous php.pear (#1206) next »