James T wrote:
It seems like in this case mysql_db_query
returns empty string but there is nothing about it in docs.
from the docs:
"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. "
so, mysql_query returns a boolean value, true or false. Hence you can test it as the previous reply stated.