Pezmc Posted December 16, 2006 Share Posted December 16, 2006 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 More sharing options...
trq Posted December 16, 2006 Share Posted December 16, 2006 [code]ORDER BY `time` ASC LIMIT 40[/code] Link to comment https://forums.phpfreaks.com/topic/30892-php-and-flash/#findComment-142582 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.