Hello there,
I'm using Flash to present data which I am pulling out of a MySQL database using a PHP script.
The setup is like this; in the frame in which I want to present the data I have a
loadVariables line which loads the data into a dynamic text field variable. The PHP script opens up a database connection, runs a couple of queries, then closes the connection.
The problem is, that it doesn't work very consistently. When I jump back to the previous frame in the Flash movie and then back, only sometimes does it "reload" the variables. It could have something to do with the SQL connection but I'm not sure.
Anyone knows what might be an issue here?
Thanks in advance...
If your php script places all the mysql data in one variable and then printed,
example:
while ($sqlData = mysql_fetch_array($sqlDatabase))
{
$my_sqlData .= sqlData['entry']; //keeps adding data to one
variable
}
print "flashTextField=$my_sqlData";// prints the entire data
this might take a very long time and might pose problems. A better practice would be to print the data right away.
example:
print "flashTextField="; //enters blank text just to declare where to print the
data
while ($sqlData = mysql_fetch_array($sqlDatabase))
{
$my_sqlData = sqlData['entry'];
print "$my_sqlData";// prints data one at a time. It won't overwrite previous
data.
}
if thats not the prob, then something in flash might be preventing the php script from running properly..maybe flash functions not executing at the right time or something. Or possibly, flash variables are not being reloaded or something..i'm a newbie too..lol