Jump to content

Delaying database results


ryanwood4

Recommended Posts

Hello,

 

How would I delay results by 10 minutes, using the below script. Not sure what I need to add to delay the results.

 

Each result has a datetime called date in the database.

 

<?php
	$con = mysql_connect("localhost","xxx","xxx");
	if (!$con)
		 {
  		die('Could not connect: ' . mysql_error());
  		}

	mysql_select_db("xxx", $con);

	$result = mysql_query("SELECT * FROM members ORDER BY date DESC limit 0,1");

	while($row = mysql_fetch_array($result))
	{
		 echo '<img class="scaled" src="'.$row['image'].'"/><br />';
		 echo '<h3><a href="display/'.$row['id'].'">'.$row['title'].'</a></h3>';
	}

	mysql_close($con);
	?> 

 

Any help is greatly appreciated.

Thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/194348-delaying-database-results/
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.