ZF-7085: support for returning mysqli result
Description
Resource Adapter in ZendAMF so that users can return mysqli result similar to the one written for mysql.
Resource Adapter in ZendAMF so that users can return mysqli result similar to the one written for mysql.
Comments
Posted by Wade Arnold (wadearnold) on 2009-06-22T07:16:48.000+0000
Any chance you can male an Adapter? I will add it into the next release
Posted by Mayank Kumar (mayankk) on 2009-06-22T10:23:04.000+0000
File with indicative code attached. Please verify mysqli code to mysql datatype and then mysql datatype to php datatype mappings.
Posted by Wade Arnold (wadearnold) on 2009-06-22T10:32:50.000+0000
Added into the next mini release
Posted by Mayank Kumar (mayankk) on 2009-06-22T21:54:45.000+0000
Noticed that this issue has been fixed in revision 16239. I tried placing this resource adapter under Zend/Amf/Parse/Resource but it doesn't seem to get picked up. Are there any more changes required for this adapter to get picked up?
Posted by Wade Arnold (wadearnold) on 2009-06-23T10:16:47.000+0000
Adapter not being picked up from the resource directory
Posted by Wade Arnold (wadearnold) on 2009-06-23T10:19:14.000+0000
The resources are encountered in Zend_Amf_Parse_TypeLoader::handleResource. Is the file name that you specified match the resource type? There are two mysqli resource types. mysqli and mysqliobject. Can you see which type you are getting?
Posted by Mayank Kumar (mayankk) on 2009-06-23T21:44:25.000+0000
http://in2.php.net/manual/en/…
mysql_query used to return a resource for which ZF supported the concept of resource adapters.
http://in2.php.net/manual/en/mysqli.query.php
mysqli_query on the other hand returns a MySQLi_Result object. Hence, is_resource() on the result returns false so the resource adapter look up does not happen. We may need some other support for custom class serializers in ZF.
Posted by Wade Arnold (wadearnold) on 2009-06-23T21:58:33.000+0000
Stas, Got any thoughts on how to handle the MySQLi resource type?
Posted by Stanislav Malyshev (stas) on 2009-07-08T11:12:25.000+0000
Mysqli doesn't return resource, it returns an object.