Jump to content

Php and flash


Pezmc

Recommended Posts

This is not really php but a combination of flash and php.

I have a script that does this:
[code=php:0] // Fetch page-wise comments from database table
$sql .= ' ORDER BY `time` DESC LIMIT 30';
$fewComments = mysql_query($sql, $DBConn) or die("Error in Chat: " . mysql_error());
$numfewComments = mysql_num_rows($fewComments);


    while ($array = mysql_fetch_array($fewComments)) {
  $name = mysql_result($fewComments, $i, 'name');
  $comments = mysql_result($fewComments, $i, 'comments');
 
  print '<b>' . $name . '</b>: ' . $comments . '<br>';
  $i++;
    }[/code]

And then the flash takes the inpormation and displayes it in a text area,

However this script is for a chat and having the messages appear from the top kinda sux, how can I:

In php make it display the entrys in the last ten minuites (Time collomb = date ("Y-m-d H:i:s",time()); ) to a maximum of 40.
However make them apear with the oldest of the 40 first and the most recent last,

Also in flash make the text area autoscroll to the bottem,

Thanks,
Link to comment
https://forums.phpfreaks.com/topic/30892-php-and-flash/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.