note 25552 deleted from function.get-resource-type by jmcastagnetto
| From: | jmcastagnetto@php.net | Date: | Fri, 27 Sep 2002 21:15:15 +0000 |
| Subject: | note 25552 deleted from function.get-resource-type by jmcastagnetto | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-37350@lists.php.net to get a copy of this message | ||
Something which caught me was a closed mysql resource. I was trying to work out why some code
didn't work and was doing:
if (is_resource($dbconn)) {
echo "is a resource<br>";
echo "resource type is " . get_resource_type($dbconn)
}
and this was displaying 'resource type is unknown error'
I quickly realised that the cause was that I had closed the mysql link by mistake in a subfunction.
Maybe this would be a good enhancement for a future version of php.. to be able to return something
like 'closed mysql resource' instead???
Regards
Ian Murphy