0
Times on the system where work happens to appear the following errors mysql_error() = ""
and mysql_errno() = "0"
, but it happens very rarely .
my code:
// Essa função está dentro de uma class do meu sistema
// Exemplo : $sql = "Call procedure(1)" obs:no meu sistema trabalhamos com procedures
public function executa($sql){
if($query = mysql_query($sql, $this->conn)){
return $query;
}else {
echo mysql_error();
echo "<hr>";
echo mysql_errno();
echo "<hr>";
echo $sql;
die();
}
}
I searched for it and what I found in the documentation of Mysql when the mysql_errno()
returns 0 means that the query was successfully executed, but if it was successfully executed because it entered the else
of my parole ?
In php zero is converted to false, then it falls on Else. pq does not change the structure a bit. Its Procedure returns value?
– rray
@rray but ai in the case was successfully executed, both that running on Workbench works, and the return 0 of the function
msql_errno()
it means that everything went right, and yes the Procedure returns the data with which I fill the page and the strange thing is that now it is working perfectly without having been made any changes, I saw people in the English stackoverflow who had similar problems wheremysql_error() = “”
andmysql_errno() = “0”
but their solutions did not suit me– Vinicius Shiguemori