Welcome Guest, Not a member yet? Register   Sign In
Error control operators in mysql_driver?
#1

[eluser]ashiina[/eluser]
I'm constantly having trouble dealing with Mysql errors.
Things such as
* php-mysql library load error
* DB Connection error
* Query syntax error
are all being suppressed with the "@" operator, like as follows:

Code:
return @mysql_connect($this->hostname, $this->username, $this->password, TRUE);
...
return @mysql_query($sql, $this->conn_id);

I believe that they should ideally all be caught and outputted in some way,
so that developers don't have to wonder where their error is occurring.

My simple solution would be to remove the "@" operators so that
the errors will at least appear in your server log (and that's what I'm doing in my app),
but is there a problem with that?


Messages In This Thread
Error control operators in mysql_driver? - by El Forum - 03-20-2012, 02:26 AM
Error control operators in mysql_driver? - by El Forum - 03-20-2012, 02:28 AM
Error control operators in mysql_driver? - by El Forum - 03-20-2012, 02:31 AM
Error control operators in mysql_driver? - by El Forum - 03-20-2012, 02:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB