Hi,
I have created myself some mysql function to make it easier when calling mysql data.
The problem I get is that if the value of the field is 0 then it picks it up as an error and fires it over to sqlerrorhandler function. When it is actually working just the fields value is 0.
[code=php]
function mysqlresult($queryresult, $field, $file, $function, $line, $sql) {
$sqlresult = @mysql_result($queryresult, 0, $field);
if (!$sqlresult) {
sqlerrorhandler(“(“.mysql_errno().”)”,”S0006″, mysql_error(), $file, $function, $line, $sql);
} else {
return $sqlresult;
}
}
The same issue occurs if num rows equals 0 too.
Any help would be great,
Thanks
k0r54