Entry
What's different between mysql_db_query and mysql_query? And what's better?
May 2nd, 2000 11:20
Henrik Hansen, Romain Xie, www.php.net/manual/
mysql_query() returns TRUE (non-zero) or FALSE to indicate whether or
not the query succeeded. A return value of TRUE means that the query was
legal and could be executed by the server. It does not indicate anything
about the number of rows affected or returned. It is perfectly possible
for a query to succeed but affect no rows or return no rows.
ex: int mysql_query(string query, int [link_identifier] );
mysql_db_query returns a positive MySQL result identifier to the query
result, or false on error. mysql_db_query() selects a database and
executes a query on it. If the optional link identifier isn't specified,
the function will try to find an open link to the MySQL server and if no
such link is found it'll try to create one as if mysql_connect() was
called with no arguments
ex: int mysql_db_query(string database, string query, int
[link_identifier] );
I thinks it's genneraly a matter of taste, which one is the better.