• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Connect to Data/Service (PHP) problems should be fixed

Explorer ,
Aug 28, 2010 Aug 28, 2010

Copy link to clipboard

Copied

1.insert ByteArray into or select from mysql blob with PHP ERROR

The default code is error, I couldn't insert ByteArray data into mysql till I add the mysqli_send_long_data() method.

  • $stmt = mysqli_prepare($this->connection, "INSERT INTO $this->tablename (info, info2) VALUES (?, ?)");
  • $this->throwExceptionOnError();

  • mysqli_stmt_bind_param($stmt, 'bs', $item->info, $item->info2);
  • $this->throwExceptionOnError();

  • mysqli_send_long_data($stmt, 0, $item->info);

  • mysqli_stmt_execute($stmt);

And add $stmt->store_result(); when you get blob data:

  • mysqli_stmt_execute($stmt);
  • $stmt->store_result();
  • foreach($rows as $value){
         if($value->info){                    $value->info = new Zend_Amf_Value_ByteArray($value->info);               }           }            reference:http://blogs.sun.com/oswald/entry/php_s_mysqli_extension_storing       

2.Test Operation is ok, but use in application couldn't work.   I have to change the PHP function name to make it shown in flash builder color "gray" , and then it works.

3.The auto created method like update... and delete... should be like below, return the affected num.

  • $affected = mysqli_stmt_affected_rows($stmt);
  • mysqli_stmt_free_result($stmt);
  • mysqli_close($this->connection);
  • return $affected;

Views

700

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 29, 2010 Aug 29, 2010

Copy link to clipboard

Copied

Anybody agree with me?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Aug 29, 2010 Aug 29, 2010

Copy link to clipboard

Copied

Can you pls. file bug for this at http://bugs.adobe.com/flex

Thanks

-Sunil

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 30, 2010 Aug 30, 2010

Copy link to clipboard

Copied

LATEST

Sorry , I can't sing in bug system.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines