title: how to get last weeks entry in mysql by using php
body: <p>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...</p>
  
  <pre><code> &lt;?php
  
   $wherecat = "`p_order_status` = 'active' AND `p_order_date` LIKE '".date('Y-m-d')."%' ";
   $catsql =$general-&gt;GetRows('*' ,'p_order' ,$wherecat);
   $catRes = mysql_num_rows($catsql);
   ?&gt;
  &lt;p&gt;&lt;?=$catRes;?&gt;&lt;/p&gt;
  
  &lt;div class="box1"&gt;
      &lt;span class="li_cloud"&gt;&lt;/span&gt;
      &lt;h3&gt;Order Placed in Last Week&lt;/h3&gt;
  &lt;/div&gt;
  &lt;?php
  
   $wherecat1 = "`p_order_status` = 'active' AND `p_order_date` LIKE '".date('Y-m-d',strtotime('-1 day')). "%' ";
   $catsql1 =$general-&gt;GetRows('*' ,'p_order' ,$wherecat1);
   $catRes1 = mysql_num_rows($catsql1);
   ?&gt;
  
  &lt;p&gt;&lt;?=$catRes1;?&gt;&lt;/p&gt;
  </code></pre>