* Remove logging of $result as it is a resource handler (#626)
* Move error logging from tep_db_query() to tep_db_error() as tep_db_error() kills further execution of the script and the error is not then logged in tep_db_query()