Try this. expiry date is the date created by time() in php.
If it is a standard date try this where :
PHP Code: 
where datediff(curdate(),expiry_date)=
PHP Code: 
<?php
// Make a MySQL Connection
mysql_connect("localhost""admin""1admin") or die(mysql_error());
mysql_select_db("test") or die(mysql_error());

// Get all the data from the "example" table
$result mysql_query("SELECT * FROM example where datediff(curdate(),from_unixtime(expiry_date))=2 "
or die(
mysql_error());  

echo 
"<table border='1'>";
echo 
"<tr> <th>date</th> <th>client</th><th>product</th> <th>expiry date</th><th>amount</th>  </tr>";
// keeps getting the next row until there are no more to get
while($row mysql_fetch_array$result )) {
    
// Print out the contents of each row into a table
    
echo "<tr><td>"
    echo 
$row['date'];
    echo 
"</td><td>"
    echo 
$row['client'];
    echo 
"</td><td>"
    echo 
$row['product'];
    echo 
"</td><td>"
    echo 
$row['expiry_date'];
    echo 
"</td><td>"
    echo 
$row['amount'];
    echo 
"</td></tr>"


echo 
"</table>";
?>
Lock Down Reviewed by Lock Down on . I Need Script PHP and SQL Dear friends, I need a script that will display 2 days before the expiry date record. For Example My DB: Date | Client | Product | Expiry Date | Amount Thank You Rating: 5