I'm interested in how could I create my own function allowing it to be executed without error logging, but only if executed with @ operator, like @function();?
Function:
public function query($sql, $id = false){
$this->query_id = mysqli_query($this->connection, $sql);
if(!$this->query_id){
// I want to suppress this error call here...
psyo::error("Error while executing query (sql: {$sql}).");
return NULL;
}else{
$this->result = mysqli_store_result($this->connection);
$this->affected = mysqli_affected_rows($this->connection);
return $id ? $this->query_id : $this;
}
}
P.S. I'm using my own error handling class, and it isn't operated with error_log(); or so.
Thanks in advance!
query();,psyo::error();is executed; if I call@query();it's not.