Jump to content

Working out 7 days


graham23s

Recommended Posts

Hi Guys,

 

in this query i am trying to find the number of products (added by date) in the last 7 days!

 

so if i upload 23 new products in the last 7 days the query selects all date/time stamps from the last 7 days!

 

i have:

 

<?php
                  $q_p = "SELECT `date_added` FROM `fcp_products` WHERE `date_added` >= CURDATE();";
                  $r_p = mysql_query($q_p);
                  $n_p = mysql_num_rows($r_p);
?>

 

so far not sure how to do it though any help would be great :)

 

cheers

 

Graham

Link to comment
https://forums.phpfreaks.com/topic/125647-working-out-7-days/
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.