• <tfoot id='AUVHD'></tfoot>
    <legend id='AUVHD'><style id='AUVHD'><dir id='AUVHD'><q id='AUVHD'></q></dir></style></legend>
      <bdo id='AUVHD'></bdo><ul id='AUVHD'></ul>

      <small id='AUVHD'></small><noframes id='AUVHD'>

      <i id='AUVHD'><tr id='AUVHD'><dt id='AUVHD'><q id='AUVHD'><span id='AUVHD'><b id='AUVHD'><form id='AUVHD'><ins id='AUVHD'></ins><ul id='AUVHD'></ul><sub id='AUVHD'></sub></form><legend id='AUVHD'></legend><bdo id='AUVHD'><pre id='AUVHD'><center id='AUVHD'></center></pre></bdo></b><th id='AUVHD'></th></span></q></dt></tr></i><div id='AUVHD'><tfoot id='AUVHD'></tfoot><dl id='AUVHD'><fieldset id='AUVHD'></fieldset></dl></div>

        使用 Flex 将表单字段保存在 MySQL 数据库中

        时间:2023-08-21
          • <small id='3dbFF'></small><noframes id='3dbFF'>

            <legend id='3dbFF'><style id='3dbFF'><dir id='3dbFF'><q id='3dbFF'></q></dir></style></legend>
                <bdo id='3dbFF'></bdo><ul id='3dbFF'></ul>

                  <tbody id='3dbFF'></tbody>
                <i id='3dbFF'><tr id='3dbFF'><dt id='3dbFF'><q id='3dbFF'><span id='3dbFF'><b id='3dbFF'><form id='3dbFF'><ins id='3dbFF'></ins><ul id='3dbFF'></ul><sub id='3dbFF'></sub></form><legend id='3dbFF'></legend><bdo id='3dbFF'><pre id='3dbFF'><center id='3dbFF'></center></pre></bdo></b><th id='3dbFF'></th></span></q></dt></tr></i><div id='3dbFF'><tfoot id='3dbFF'></tfoot><dl id='3dbFF'><fieldset id='3dbFF'></fieldset></dl></div>

                  <tfoot id='3dbFF'></tfoot>
                  本文介绍了使用 Flex 将表单字段保存在 MySQL 数据库中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我有一个 MySQL 数据库,我创建了一个数据库并将其命名为PERSONDB".在该数据库中,我创建了一个表并将其命名为 Person.该表有 3 个字段.id,name,age.

                  I have a MySQL database, and i created a DB and named it 'PERSONDB'. Within that DB, i have created a table and named it Person. This table has 3 fields. id,name,age.

                  现在我需要将一些值从我的 flex 网站保存到我创建的 mySQL 'PERSONDB'.

                  Now i need to save some values from my flex website to the mySQL 'PERSONDB' that i created.

                  我如何在 Flex (Flax builder 4.6) 中执行此操作

                  How can i do this in Flex (Flax builder 4.6)

                  注意:我在 Flex 项目中添加了 2 个字段名称和年龄,当用户单击按钮时,我需要将这些值保存在数据库中.我该怎么做.

                  Note: I have added 2 fields name and age, in the Flex project and when the user clicks on the Button i need those values to be saved in the DB. how can i do this.

                  推荐答案

                  asSQL ( http://code.google.com/p/assql/ ) 是使用 mySQL 的好方法.它允许从 AIR 或基于 Web 的任何应用程序直接访问 mySQL.我在编码中经常使用它,因此我不必编写 Java 或 PHP 作为后端,除非有充分的理由安装后端.

                  asSQL ( http://code.google.com/p/assql/ ) is a good approach to using mySQL. It allows for direct access to mySQL from any application either in AIR or web based. I use this pretty regularly in my coding so I don't have to write a Java or PHP as a back end unless there is a good reason to have a back end in place.

                  好的,这是我使用的代码:

                  OK, here is the code I use:

                      <assql:MySqlService id         ="DB"
                                          hostname   ="localhost"
                                          username   ="user"
                                          password   ="password"
                                          database   ="db"
                                          autoConnect="true"
                                          connect    ="handleConnected(event)"
                                          sqlError   ="handleError(event)"/>
                  
                  
                          private function getSelectedData() : void
                          {
                              DB.send("SELECT * from table WHERE number = '" + number.text + "'");
                          }
                  

                  仅此而已.顶部设置连接,位于代码部分.其余部分在 (ActionScript) 部分.当然,也可以直接在 ActionScript 中完成,但是这个解决方案使用了 MXML.

                  That's all there is too it. The top part sets up the connection and is in the section of the code. The rest is in the part (ActionScript). Of course, it can be done in straight ActionScript as well, but this solution used MXML.

                  这篇关于使用 Flex 将表单字段保存在 MySQL 数据库中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:从 Adob​​e flex/AIR 访问 mysql 下一篇:sqlite &amp;flex - 如果不存在则插入?

                  相关文章

                  最新文章

                  <i id='fFxux'><tr id='fFxux'><dt id='fFxux'><q id='fFxux'><span id='fFxux'><b id='fFxux'><form id='fFxux'><ins id='fFxux'></ins><ul id='fFxux'></ul><sub id='fFxux'></sub></form><legend id='fFxux'></legend><bdo id='fFxux'><pre id='fFxux'><center id='fFxux'></center></pre></bdo></b><th id='fFxux'></th></span></q></dt></tr></i><div id='fFxux'><tfoot id='fFxux'></tfoot><dl id='fFxux'><fieldset id='fFxux'></fieldset></dl></div>

                    <tfoot id='fFxux'></tfoot>

                      <small id='fFxux'></small><noframes id='fFxux'>

                    1. <legend id='fFxux'><style id='fFxux'><dir id='fFxux'><q id='fFxux'></q></dir></style></legend>
                      • <bdo id='fFxux'></bdo><ul id='fFxux'></ul>