A statement like this won't work in your php-file:
$qResult = mysql_query ("SELECT eventDate, title, startTime, endTime * FROM
nuke_4ncal ORDER BY eventDate ASC");
Either you select specified fields from the database (eventDate, title, etc..)
or * (ALL).
$qResult = mysql_query ("SELECT eventDate, title, startTime, endTime FROM
nuke_4ncal ORDER BY eventDate ASC");
or
$qResult = mysql_query ("SELECT * FROM nuke_4ncal ORDER BY eventDate ASC");
Do as much selecting as you can in PHP. You only want to show the upcoming
events starting with the current date? Make that selection in PHP which
prevents sending data you won't be using to Flash.
Once in Flash you use the LoadVars Class (since you are echoing a string with
variables from PHP). Because you want to display the data in a scrollable text
area, you would need to be able to loop over the results from the database. The
way you return the results is (according to your PHP-file) in the form:
&n=10&eventDate0=someDate&entry0=someText&
Once in Flash use a LoadVars object. The for loop will print all records with
line breaks.
var dataReceiver:LoadVars = new LoadVars();
dataReceiver.onLoad = function(){
// clean all previous text
myText_txt.text=""; // myText is a dynamic text field on the stage
for(var i=0; i<this.n; i++) {
myText_txt.text+=this["eventDate"+i]+newline+this["title"+i]+newline+this["start
Time"+i]+newline+this["endTime"+i]+newline+newline;
}
}
// Load the data
dataReceiver.load("urlToYourPHPfile");
One more error in your PHP-file:
$rString
..="&eventDate".$i."=".$row['eventDate']."&"."&entry".$i."=".$row['entry']."&";
You will get a string like
&n=10&eventDate0=someDate&&entry0=someText& and you have a double &&
Change that to
$rString
..="&eventDate".$i."=".$row['eventDate']."&entry".$i."=".$row['entry']."&";
and you only need the last & if you put your variables on seperate lines,
otherwise you can omit this.
No, it's not a complete answer but it will start you off. An excellent
resource for PHP-tutorials on dates (and a whole lot of other subjects) is
www.phpfreaks.com and in the data integration section of the MM site
(
www.macromedia.com/devnet/mx/flash/data_integration_html) you will find
tutorials on what you are trying to achieve.
Hope this helps.