Zend Arguments issue - RESOLVED!!

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
unkempt
Forum Newbie
Posts: 6
Joined: Tue Mar 25, 2008 5:20 pm

Zend Arguments issue - RESOLVED!!

Post by unkempt »

If anyone else has the same issue below, download the new preview version of zend 1.8
Several bug fixes included in this release.

ok, sorry for the second post, but i think this is a separate topic.

I am using Flash AS3 with PHP MySQL and zend.

When you make a NetConnection.call you can pass multiple arguments ie

nc.call("phpFunction", responder, arg1, arg2, arg3);

but if i try to send an array with multiple arguments ie

In Flash...

Code: Select all

var mydata:Array = new Array();
mydata.id = 1;
mydata.name = "Name1";
nc.call("phpFunction", responder, mydata);
 
InPhp...

Code: Select all

public function getVaried($data)
    {
        $sql = "SELECT * FROM testTable WHERE ";
        foreach ($data AS $key => $value){
            $sql .= "$key = '$value' AND ";
        }
        $sql = substr($sql, 0, -5);
        $result = mysql_query($sql);
        $t = array();
        while($row = mysql_fetch_assoc($result))
        {
            array_push($t, $row);
        }
        return $sql;
        
    }
flash traces - SELECT * FROM testTable WHERE 0 = 'Array'
so it doesn't seem to be running through more than one item, but also is not grabbing the relevant data

if i return $data flash traces nothing

Would you agree that the php is not receiving an array - or is my code rubbish????
Post Reply