Zend Framework

support for returning mysqli result

Details

  • Type: Improvement Improvement
  • Status: Postponed Postponed
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.8.3
  • Fix Version/s: None
  • Component/s: Zend_Amf
  • Labels:
    None

Description

Resource Adapter in ZendAMF so that users can return mysqli result similar to the one written for mysql.

Activity

Hide
Wade Arnold added a comment -

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

Show
Wade Arnold added a comment - Any chance you can male an Adapter? I will add it into the next release
Hide
Mayank Kumar added a comment -

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

Show
Mayank Kumar added a comment - File with indicative code attached. Please verify mysqli code to mysql datatype and then mysql datatype to php datatype mappings.
Hide
Wade Arnold added a comment -

Added into the next mini release

Show
Wade Arnold added a comment - Added into the next mini release
Hide
Mayank Kumar added a comment -

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?

Show
Mayank Kumar added a comment - 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?
Hide
Wade Arnold added a comment -

Adapter not being picked up from the resource directory

Show
Wade Arnold added a comment - Adapter not being picked up from the resource directory
Hide
Wade Arnold added a comment -

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?

Show
Wade Arnold added a comment - 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?
Hide
Mayank Kumar added a comment -

http://in2.php.net/manual/en/function.mysql-query.php

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.

Show
Mayank Kumar added a comment - http://in2.php.net/manual/en/function.mysql-query.php 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.
Hide
Wade Arnold added a comment -

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

Show
Wade Arnold added a comment - Stas, Got any thoughts on how to handle the MySQLi resource type?
Hide
Stanislav Malyshev added a comment -

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

Show
Stanislav Malyshev added a comment - Mysqli doesn't return resource, it returns an object.

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated: