note 25552 added to function.get-resource-type

From: Date: Fri, 27 Sep 2002 14:30:29 +0000
Subject: note 25552 added to function.get-resource-type
Groups: php.notes 
Request: Send a blank email to php-notes+get-37329@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 -- http://www.php.net/manual/en/function.get-resource-type.php http://master.php.net/manage/user-notes.php?action=edit+25552 http://master.php.net/manage/user-notes.php?action=delete+25552 http://master.php.net/manage/user-notes.php?action=reject+25552

« previous php.notes (#37329) next »