Re: Status of mysql_db_query()
| From: | Georg Richter | Date: | Sat, 07 Sep 2002 07:58:11 +0000 |
| Subject: | Re: Status of mysql_db_query() | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-88024@lists.php.net to get a copy of this message | ||
On Friday 06 September 2002 19:17, Melvyn Sopacua wrote:
> On Fri, 6 Sep 2002, Georg Richter wrote:
>
> One can do it, with an extra query "SELECT DATABASE()".
>
1) Its not a good idea, to move SQL queries into the extension instead of
using api-calls. That should be the job of userland functions.
2) In case you have an syntax error in your SQL-Statement, its not possible
to determine the error via mysql_error or mysql_errno cause the mysql_error
functions always return the error from the last command, which is not
mysql_real_query but mysql_select_db.
Regards
Georg