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. >>>>>>>>>>>>>>>>>>>>>> $result = mysql_query ( $query, $mysql ); if ( !$result ) { HandleError ( mysql_errno(), mysql_error() ); return; } if ( !mysql_num_rows ( $result ) && !mysql_num_fields ( $result ) ) { // handle non_result values return; } // handle result values >>>>>>>>>>>>>>>>>>>>>>>> The problem is that if its an Update stmt. php throws up an error that $result in mysql_num_rows() is not a valid handle. Moreover, from the manual - mysql_affected_rows() does not work with SELECT statements; only on statements which modify records. So to use it I have to figure out if its a non-SELECT statement What you PHP gurus suggest the best way to handle such situations? Thanks in advance Regards, Karam _______________________________ Do you Yahoo!? Express yourself with Y! Messenger! Free. Download now. http://messenger.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php