unifying DB extensions

From: Date: Wed, 14 Feb 2001 09:06:58 +0000
Subject: unifying DB extensions
Groups: php.qa 
Request: Send a blank email to php-qa+get-2385@lists.php.net to get a copy of this message
Do we want to bring all the DB extensions closer to each other? If so, here are some thoughts: * Error repororting should be unified as much as possible. "easy" stuff: ibase_errmsg -> ibase_error sesam_errormsg -> sesam_error ora_errorcode -> ora_errno ifx_error -> ifx_errno ifx_errormsg -> ifx_error etc. * We should get rid of differences such as ifx_htmltbl_result vs. odbc_result_all - both of these print all rows of the resultset in a html table. * We should get rid of misleadingly named functions. Compare <pretty much anything>_(num|affected)_rows with ifx_(num|affected)_rows. Or check out ovrimos_fetch_row. Current state of error reporting in various db extensions: Informix: string ifx_error([int connection_id]) Returns the Informix error codes (SQLSTATE & SQLCODE) string ifx_errormsg([int errorcode]) Returns the Informix errormessage associated with the most recent Informix error, or, when the optional "errorcode" param is present, the error message corresponding to "errorcode". Ingres II: no error reporting Interbase: string ibase_errmsg(void) Returns a string containing an error message. MS SQL Server: string mssql_get_last_message(void) Gets the last message from the MS-SQL server mSQL: string msql_error([int link_identifier]) Returns the text of the error message from previous mSQL operation MySQL: int mysql_errno([int link_identifier]) Returns the number of the error message from previous MySQL operation string mysql_error([int link_identifier]) Returns the text of the error message from previous MySQL operation Oracle (OCI): array ocierror([int stmt|conn|global]) Return the last error of stmt|conn|global. If no error happened returns false. Oracle (ORA): string ora_error(int cursor_or_connection) Get an Oracle error message int ora_errorcode(int cursor_or_connection) Get an Oracle error code Ovrimos: no error reporting PostgreSQL: no error reporting SESAM: string sesam_errormsg(void) Returns the SESAM error message associated with the most recent SESAM error. Sybase: string sybase_get_last_message (void ) Returns the last message reported by the server. ____________________________________________________________ Cynic: A member of a group of ancient Greek philosophers who taught that virtue constitutes happiness and that self control is the essential part of virtue. cynic@mail.cz

« previous php.qa (#2385) next »