Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > Supporting Technologies > Server-Side Scripting

Reply
 
Thread Tools Rate Thread Display Modes
Old 11-05-2009, 10:34 PM   #1
OMEGA_ReD
Registered User
 
Join Date: Nov 2006
Posts: 24
Default Data from a mysql database

Hello All,

Im building a new flash website with a mysql db connection.

Im just beginning to understand how it works but there are some unclaritys.

I've uploaded an image to show what my idea is. It's easier for me to make a image than typing the whole scenario, images speak a thousand words!

I need to know what the best way is to let my flash site communicate with the database. I found some tutorials but at this point i can get 1 variable in flash true php.

I prefer to use PHP if possible because i'm most familiar with it!

Can someone point me in the right direction or help me?

Many thanks!
Attached Thumbnails
Click image for larger version

Name:	Site uitleg.png
Views:	20
Size:	63.7 KB
ID:	32838  
OMEGA_ReD is offline   Reply With Quote
Old 11-06-2009, 12:14 AM   #2
ASWC
Site Contributor
 
Join Date: Dec 2007
Location: Vermont, USA
Posts: 3,178
Default

I output all my data coming from the database as dynamic XML written by my PHP. My advice for you would be just that. Make your PHP open the database and select all data you need then print all of it as XML and load it in your Flash website. Example:
PHP Code:
    $structure "select * from $table_name WHERE `ID`='$ID';";
    
$query_result mysql_query($structure);
    
$content "<content>";    
    
    while(
$row mysql_fetch_array($query_resultMYSQL_ASSOC)){
    
$content .= "<SLIDESHOW>";
    
$content .= "<ID>".$row['ID']."</ID>";
    
$content .= "<BACK>".$row['BACK']."</BACK>";
    
$content .= "<DTIME>".$row['DTIME']."</DTIME>";
    
$content .= "<TTIME>".$row['TTIME']."</TTIME>";
    
$content .= "<COMMENTS>".$row['COMMENTS']."</COMMENTS>";
    
$content .= "<RANDOM>".$row['RANDOM']."</RANDOM>";
    
$content .= "<ESTART>".$row['ESTART']."</ESTART>";
    
$content .= "<WIDTH>".$row['WIDTH']."</WIDTH>";
    
$content .= "<HEIGHT>".$row['HEIGHT']."</HEIGHT>";
    
$content .= "<EFFECTIN>".$row['EFFECTIN']."</EFFECTIN>";
    
$content .= "<EFFECTOUT>".$row['EFFECTOUT']."</EFFECTOUT>";
    
$content .= "<EXTRA>".$row['EXTRA']."</EXTRA>";
    
$content .= "</SLIDESHOW>";
    }    
        
$content .= "</content>";

        print(
$content);//output the xml 
__________________
aswebcreations
ASWC is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:25 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.