Issues

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.

Comments

Any chance you can male an Adapter? I will add it into the next release

File with indicative code attached. Please verify mysqli code to mysql datatype and then mysql datatype to php datatype mappings.

Added into the next mini release

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?

Adapter not being picked up from the resource directory

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?

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.

Stas, Got any thoughts on how to handle the MySQLi resource type?

Mysqli doesn't return resource, it returns an object.