Jump to content

Display records from a DB at different time intervals


vickkeshav

Recommended Posts

They are texts not images.

ok so I have am calling the records 1 by 1, using mysql_fetch_assoc ( .... ) and so on, All the records are displayed at once, but what I want is to display them at different intervals. Please help if u can, i,ve been struggling with this for days.. 

Link to comment
Share on other sites

<?php
include ("db_connect.php");

$q=$_GET['q'];

$nxtreply= $q+1;

$all= "select * from cmt";

$result= mysql_query($all);

$numrows = mysql_num_rows($result);

$i=1;

while($i<$numrows){


$sql="SELECT cmmt FROM cmt WHERE cat_num = '$nxtreply' ORDER BY RAND()LIMIT 0,1";

$result2 = mysql_query($sql);

while($row = mysql_fetch_assoc($result2))
  {

echo "<button type='button' onclick= com() >SIMULATE</button> ";
echo "<table border='1'>
<tr>
<th>Comment</th>

</tr>";



  echo "<tr>";
  echo "<td>" . $row['cmmt'] . "</td>";

  echo "</tr>";
  }
echo "</table>";
$nxtreply++;
$i++;
}



mysql_close($con);
?>

 

 

 

These are the codes, the records from the table are displayed all at the same time, I want each Record to be displayed at different time intervals

 

MOD EDIT:

 . . . 

BBCode tags added.

Link to comment
Share on other sites

the intervals are in seconds, suppose I have a range of int; 1 to 10

So the first post is echoed without any interval, the second record must be echoed after say 5 seconds (any number from range 1 to 10) and the third record maybe after 6 second or 8 seconds.. (it can be any seconds as far as it there is a delay between the last echoed record and the present echoed record)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.