there is table in data base as P_order now i want fetch the last one weeks entry in that data base.... as i fetched the entry of the present date....but not able to fetch the last one week entry...
<?php
$wherecat = "`p_order_status` = 'active' AND `p_order_date` LIKE '".date('Y-m-d')."%' ";
$catsql =$general->GetRows('*' ,'p_order' ,$wherecat);
$catRes = mysql_num_rows($catsql);
?>
<p><?=$catRes;?></p>
<div class="box1">
<span class="li_cloud"></span>
<h3>Order Placed in Last Week</h3>
</div>
<?php
$wherecat1 = "`p_order_status` = 'active' AND `p_order_date` LIKE '".date('Y-m-d',strtotime('-1 day')). "%' ";
$catsql1 =$general->GetRows('*' ,'p_order' ,$wherecat1);
$catRes1 = mysql_num_rows($catsql1);
?>
<p><?=$catRes1;?></p>