Amfphp 2.2 Serializer mysqli_result

时间:2014-07-18 20:50:31

标签: php amfphp

尝试整天解决这个问题但找不到解决方案...

有人帮助我吗?

[18-Jul-2014 17:13:11 America/Sao_Paulo] PHP Fatal error:  Uncaught exception 'Amfphp_Core_Exception' with message 'Undefined property: mysqli_result::$1 . 
file:  /www/mysaas_teste/amfphp/Amfphp/Core/Amf/Serializer.php 
line: 911 
context: Array
(
    [d] => mysqli_result Object
        (
            [current_field] => 0
            [field_count] => 14
            [lengths] => 
            [num_rows] => 2
            [type] => 0
        )

    [explicitTypeField] => _explicitType
    [className] => mysqli_result
    [propertyNames] => Array
        (
            [0] => 1
        )

    [traitsInfo] => Array
        (
            [referenceId] => 0
            [propertyNames] => Array
                (
                    [0] => 1
                )

        )

    [key] => 1
    [value] => Array
        (
            [perfil] => 1
            [tela] => abertura_turno
            [funcao] => VISUALIZAR
            [acesso] => 1
            [data_inc] => 2014-05-28
            [hora_inc] => 16:20:35
            [user_inc] => 
            [data_alt] => 
     in /www/mysaas_teste/amfphp/Amfphp/Plugins/AmfphpErrorHandler/AmfphpErrorHandler.php on line 42

由于

1 个答案:

答案 0 :(得分:0)

可能是您直接返回mysqli结果集吗?你无法做到这一点,你需要将其转换为数组。我的建议(以及最佳实践,我认为)不是直接使用mysqli而是PDO,它提供了一个方便的抽象层来操作数据库 http://php.net/manual/en/book.pdo.php