A problem of Channel disconnected(Flex & PHP)


hi there,

i rookie of flex. recently,i try learn adobe’s tutorials locals on:

first.jpg

http://www.adobe.com/cn/devnet/flex/testdrive/articles/2_modify_the_database.html#links

however,when attempt add employees tutorial

second.jpg

says,there error:

channel disconnected

channel disconnected before acknowledgement received

even though searched solution lot times,i haven’t find appropriate one.

it bothers me several days

so, if guys knew how figure out , please me favor.

thanx lot

nick

solution:

 

when follow testdrive tutorial assume syntax 100% ok. not case here.

 

if try use functions createemployee(), updateemployee() or deleteemployee() notice needs bind parameters $stmt variable. when php service (in case:  employeeservice) called , function reaches point binding performed php return php fatal error (you may check on php log - usualy in c:\xampp\php\logs\php_error_log)  informing there call undefined function mysqli_bind_param().

 

to solve must  change code described below:

 

      let's assume working function createemployee()

 

  public function createemployee($item) {

     $stmt = mysqli_prepare($this->connection,

     "insert employees (

     firstname,lastname,title,departmentid,officephone,cellphone,

     email,street,city,state,zipcode,office,photofile)

     values (?, ?, ?, ?, ?, ?,?,?,?,?,?,?,?)");

     $this->throwexceptiononerror();

 

 

all same until now... but, notice beggining of next statement...

 

          $stmt->bind_param('sssisssssssss', $item->firstname, $item->lastname,

                    $item->title, $item->departmentid, $item->officephone, $item->cellphone,

                    $item->email, $item->street, $item->city, $item->state,

                    $item->zipcode, $item->office, $item->photofile);

 

------------------

 

when check original code notice the

       mysqli_bind_param($stmt, 

 

was replaced by

       $stmt->bind_param(.

 

this solve problem good

 

best regards!

 

pitagoras

 



More discussions in Flex (Read Only)


adobe

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support