On Sat, 7 Sep 2002, Georg Richter wrote:

GR>>> 
GR>>> On Friday 06 September 2002 19:17, Melvyn Sopacua wrote:
GR>>> > On Fri, 6 Sep 2002, Georg Richter wrote:
GR>>> 
GR>>> >
GR>>> > One can do it, with an extra query "SELECT DATABASE()".
GR>>> >
GR>>> 1) Its not a good idea, to move SQL queries into the extension instead of 
GR>>> using api-calls. That should be the job of userland functions.
GR>>> 
GR>>> 2) In case you have an syntax error in your SQL-Statement, its not possible 
GR>>> to determine the error via mysql_error or mysql_errno cause the mysql_error 
GR>>> functions always return the error from the last command, which is not 
GR>>> mysql_real_query but mysql_select_db.

Yep. Didn't think of that.
Would it then be an idea, to wrap mysql_select_db in php_mysql_select_db and use
a global (or function with a static var, like active_db([string newdb])), to store
the 'current db'?

Or would you say, that your previous example is really a userland issue and docu-
mentation should provide some examples?

GR>>> 
GR>>> Regards
GR>>> 
GR>>> Georg
GR>>> 

-- 


Melvyn.


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to