flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepak MS <megharajdee...@gmail.com>
Subject Re: PDO vs mysqli Web Service Return Values
Date Fri, 07 Apr 2017 05:56:29 GMT
Since you are anyway looping to typecast the values in php, can you just
fetch objects using PDO(without loop), loop them in flex and type cast
instead? If that will be of help.

Or try using httpservice instead of webservice to call the php. That may
typecast it for you. I'm not sure on it, but worth a try.

On 7 Apr 2017 8:48 am, "bilbosax" <waspence41@comcast.net> wrote:

So I tried constructing an array of objects the way that it seems that
mysqli
does from the result set, and it still does not work.  Flex is still seeing
it returned as a primitive object.  *I am at a total loss guys*.  Here is
what I did in php:

            $result = $stmt->fetchAll(PDO::FETCH_OBJ);

            $rows = array();

            foreach ($result as $res) {
                $row = new stdClass();
                $row->uniqueID=$res->uniqueID;
                $row->latitude=$res->latitude;
                $row->longitude=$res->longitude;
                $rows[]=$row;
            }

            return $rows;



--
View this message in context: http://apache-flex-users.
2333346.n4.nabble.com/PDO-vs-mysqli-Web-Service-Return-
Values-tp14970p14981.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message