I am using PHP version 5.6.19.  So I took a long look at the documentation
and the msqli examples that Flex generates and noticed that it would
initialize the $row variable to a stdclass.  So, in PDO, I changed the
PDO::Fetch_Assoc parameter to PDO::Fetch_Obj.  When I do a var_dump, this is
what mysqli traces out:

array(25) {
  [0]=>
  object(stdClass)#3 (3) {
    ["uniqueID"]=>
    int(12335513)
    ["latitude"]=>
    float(39.6586675)
    ["longitude"]=>
    float(-86.0648281)
  }
  [1]=>
  object(stdClass)#4 (3) {
    ["uniqueID"]=>
    int(12368285)
    ["latitude"]=>
    float(39.6176244)
    ["longitude"]=>
    float(-86.8947852)
  }
  
when I do a var dump in PDO, this is what it looks like:

array(25) {
  [0]=>
  object(stdClass)#3 (3) {
    ["uniqueID"]=>
    int(12335513)
    ["latitude"]=>
    float(39.6586675)
    ["longitude"]=>
    float(-86.0648281)
  }
  [1]=>
  object(stdClass)#4 (3) {
    ["uniqueID"]=>
    int(12368285)
    ["latitude"]=>
    float(39.6176244)
    ["longitude"]=>
    float(-86.8947852)
  }

They look exactly the same to me, but when I set up my services with mysqli,
I am able to set the return type for all the variables in the array, and in
PDO, Flex only sees an object returned.  I want it to come back as an
arraycollection.  Any ideas?



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

Reply via email to