View Full Version : Problem accessing to MySQL database
phthanh85
11-17-2008, 02:48 AM
I have an swf file that can access to MySQL database, but when I move that swf file to another place, it no longer can access to the database. If anyone has experience with this problem, please help !
Thanks a lot !
Peter Cowling
11-20-2008, 12:25 PM
<= Flex 3 you do not access mySQL direct, you'll be doing it through some server-side code. That code needs to be correctly referenced within your .swf.
as stated above, if you want to communicate with mySQL, you will have to send a request to a PHP file stored on the server that will communicate to the database.
Client --> Flex App --> PHP --> MySQL
Then MySQL will give back the information and:
MySQL --> PHP --> Flex App --> Client
Hope that makes sense.
Farko
11-22-2008, 08:14 PM
You can use FlexSQL from from FlexCubed.
happyham57
11-23-2008, 10:27 PM
The only solution I found that worked was basically what Jage was saying in his post.
If you are trying to communicate with a MySQL database with PHP, then you are going to have to write code in this structure:
Flex application -> link to PHP files that execute MySQL commands -> convert that MySQL result into XML (so that stupid Flex can decipher it) -> feed that XML file back into the Flex application to display.
To speed this whole process, I found out WebOrb is the way to go.
IT SHOULD NOT BE THIS DIFFICULT FOR A WEB APPLICATION TO CONNECT TO A DATABASE.
drkstr
11-23-2008, 10:38 PM
Adobe REALLY needs to address something about the lack of connectivity between Flex and databases.No they shouldn't. Adobe knows what it's doing. There are reasons why you don't open up your server side services to client side code. I would never allow such a huge security flaw to be hosted on any of my servers. Client to server communication through some kind of gateway is the way to go.
Best Regards,
~Aaron
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.