When I call errorCode()
on a query $result
, I get 00000
, which looks like a string and not an integer like I’d expect.
What would be a reliable way to put it into an if
statement to see if there were no errors?
!$result->errorCode()
(int)$result->errorCode() !== 0
!empty($result->errorCode())
$result->errorCode() === '00000'
I would imagine casting it as integer should be fine in most cases?