hi, i am using the following code to retrieve information for todays date:

<?php
$query =  "select * from CUSTOMER where DATE (date) = DATE(NOW())";
$result = @mysql_query($query, $connection) 
or die ("Unable to perform query.<br />$query<br/>");
							
$num_rows = mysql_num_rows($result); 	
echo "$num_rows"; 
?>

i cant seem to find any code to extract information from yesterdays date. can you help please?

$query = "select * from customer WHERE date (date) = DATE_ADD(CURDATE(), INTERVAL -1 DAY)";

RESOLVED FROM ANOTHER SOURCE AND HERE FOR OTHER PEOPLES INFO.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.