1 Reply Latest reply on Nov 5, 2007 11:24 AM by ntsiii

    RichTextBox

    notrem
      For all the talent that is out there, and then to find out there is nobody with the ability to negotiate between a RichTextEditor in Flex 2 using ActionScript 3.0 back and for to a server database.

      I’m sick of the ‘sure it can be done’. I’m tired of the ‘well try this’. No more with the half-a-loaf where some of the code is provided with a ‘try’ this and a ‘do’ that.

      Because I don’t believe the ‘sure it can be dones’ can do it. I think the half-a-loafs leave off the rest for a reason.

      I’m telling you what’s going to happen. Instead of solving the problem, I’m going to get written off as a terrible person or worse.

      So anyhow, it’s not going to do any good. But here’s my php:

      textTB = table
      textCL = one column
      infoCL = second column
      $txt = one text variable
      $nfo = second text variable

      <?php

      // I have the server connection;
      // I have the database connection;

      INSERT:

      // I’m not sure about these include libraries.

      include 'library/config.php';
      include 'library/opendb.php';

      // I have the server connection;
      // I have the database connection;
      $query = "INSERT INTO textTB ( textCL, infoCL ) VALUES ( '$txt', '$nfo' )";
      $mysql_query( $query, $link ) or die ( "INSERT error: ".mysql_error() );

      // I’m not sure of this closing code.

      include 'library/closedb.php';
      mysql_close( $link );
      ?>

      UPDATE:
      <?php

      include 'library/config.php';
      include 'library/opendb.php';

      // server connection;
      // database connection;
      $query = "UPDATE textTB SET textCL='$txt', infoCL='$nfo' WHERE textID=1";
      mysql_query($query) or die('Error, query failed');
      include 'library/closedb.php';
      mysql_close( $link );
      ?>

      RETRIEVE:
      <?php

      include 'library/config.php';
      include 'library/opendb.php';

      // server connection;
      // database connection;
      $result = mysql_query("SELECT textCL, infoCL FROM textTB WHERE textID=1");
      list($txt, $nfo) = mysql_fetch_assoc($result);
      include 'library/closedb.php';
      mysql_close( $link );
      ?>

      I’m hoping I’m wrong. I’m not only hoping I’m wrong. I’m hoping, hoping I’m wrong.

      Well anyway, thanks,

      JL
        • 1. Re: RichTextBox
          ntsiii Level 3
          This forum is very quiet. You will have better response on the Flex 2.0 General Discussion forum.

          Also, your post, not to mention the attitude, is not conducive to eliciting a helpful response. If you decide to repost, I suggest you do less whining and put a bit more effort in describing your goal, what you have done so far, and what is not working. The path between Flex client and server-side database is not straight.

          Plus, if your question is on the PHP code, then a PHP forum might be more appropriate.

          Tracy