• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 235
  • Last Modified:

Flash, CGI, & Mysql

I want my flash file to access data in my mysql database.

How can i do this???

thanks
0
jmingo
Asked:
jmingo
  • 5
  • 4
  • 4
  • +1
2 Solutions
 
ahoffmannCommented:
database on the server? impossible.
0
 
nicholassolutionsCommented:
This is not impossible if you use middleware, most often PHP is the choice. Check out this article on how to do this:

http://actionscript-toolbox.com/samplemx_php.php

This is not the simplest thing to do, but if you are really set on it, it is pretty doable with a little bit of effort.

Cheers,
Matt
0
 
ahoffmannCommented:
assuming flash on the browser, hence impossible ;-)
If someone means a web application which produces flash for the browser which then sends request back, then ther're millions of solutions, but such a common scenario does not match to the question ...
0
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 
nicholassolutionsCommented:
>>>assuming flash on the browser, hence impossible ;-)
What do you mean by this? Take a look at the article I posted above, where they've used PHP to access a MySQL db, and LoadVars to send info back and forth between the script and the flash movie
0
 
RaydotCommented:
0
 
ahoffmannCommented:
grrr,
please read my comment http:#12537112, then read the question, and then read the posted links *stricktly in that sequence*
and I'm pretty shure everyone used to "reading" can tell me how a browser's flash connects a database on the database server directly

0
 
nicholassolutionsCommented:
easy there Texas, no reason get snappy....You obviously know what you're doing and I don't want to get into a fight with you, but....

Yes, you are correct -- browser plugins cannot directly access a server database. However, assuming that you knew of a PHP middleware solution like the ones suggested when you made your original comment, your are also being a little pedantic, don't you think? If you look at either of the sources suggested, it is obvious that flash does not access the DB itself, but it gets the job done regardless. If someone asks you how to connect a 1/8" headphone plug to a 1/4" jack, and you tell him "impossible!" instead of "get an adapter", how helpful are you really being?
0
 
RaydotCommented:
I'm not splitting hairs with you, Money, just trying to get Jmingo's question answered.  If you have anything to add I'm sure we're all ears.  
0
 
ahoffmannCommented:
> .. your are also being a little pedantic,
for shure ;-)

>  get Jmingo's question answered
well I agree that my first comment was too lazy, even it's a question itself which should have triggered giving more information.
But the problem (asked or not) have been discussed now, so it's up to the questioner to give any feedback.
0
 
RaydotCommented:
A question like "May I ask what you're trying to do?" Is a question that triggers giving more information.

0
 
wilsoneCommented:
There are plenty of reasons why a person would want to access a database from a Flash.  
This is very possible despite what ahoffmann thinks, although it is somewhat combersome.

As previousaly mentioned you would need a CGI script on the server, and it would probably be easiest to have it return the data in XML format.  However, the actionscript is fairly limited, you would have a much more robust environment if you used Director instead, there are a variety of 'Xtras' to perform this task (of which I am developing one right now).

What server side languages are available?  How familiar are you with server side scripting?  Somebody might be able to post some sample code.
0
 
RaydotCommented:
Actually, as a Director developer, I know where you're coming from Wilsone, and agree completely.

But, and I've been meaning to get back to this Q with this:  The newest version of Flash MX Professional comes with components that make it very easy to connect to a database.

Jmingo, there are a lot of people here chomping at the bit to give you answers!  I think I can speak for us all when I say that it would help if you could be as specific as possible about what you're trying to do.
0
 
nicholassolutionsCommented:
I think I deserve some points for this question. ahoffmann's comments, while technically true, were not in the least bit helpful in helping the asker to achieve his goal, and pedantic by his own description. Raydot's comments were spot-on, but he suggested exactly the same approach as I did in my initial answer to the question, which specified that middleware could be used.

Matt
0
 
nicholassolutionsCommented:
>>2-way split is max with 50 points
Ok, but next time, try not to award them to someone who is being intentionally unhelpful (i.e. ahoffmann)....
0

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

  • 5
  • 4
  • 4
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now