Karam Chand wrote:

Hello,

I have an app where one module is similar to
phpMyAdmin (well only .1%) with error_reporting() set
to E_ALL.

Now a user can execute any query. What is the best way
to know whether a query is result or non-result.

e.g.



. . .

Thanks in advance

Regards,
Karam




As it states on http://www.php.net/mysql_query :

" Only for SELECT,SHOW,EXPLAIN or DESCRIBE statements *mysql_query()* returns a resource identifier or *FALSE* if the query was not executed correctly. For other type of SQL statements, *mysql_query()* returns *TRUE* on success and *FALSE* on error. A non-*FALSE* return value means that the query was legal and could be executed by the server."

So , (false !== $result) means the query was sucessful , and if it was successful (true === $result) would mean that no rows were returned.

Chris

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to