Advertisement
Guest User

Untitled

a guest
Aug 31st, 2015
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. $date_time_array = getdate(time());
  2.  
  3. $last_month = $date_time_array["month"];
  4.  
  5. $this_year = $date_time_array["year"];
  6.  
  7. $last_mon = $date_time_array["mon"];
  8.  
  9.  
  10.  
  11. $date = mktime(0,0,0,$last_mon,1,$this_year); //The get's the first of March 2009
  12. $links = array();
  13. $newstamp = time() - 3600;
  14. $cpc = 0;
  15. $cpm = 0;
  16. $click = 0;
  17.  
  18. for($n=1;$n <= date('t',$date);$n++){
  19.  
  20.  
  21.  
  22. $thisdate = $this_year.'-'.$last_mon.'-'.str_pad($n, 2, '0', STR_PAD_LEFT );
  23.  
  24. $sql = "select * from pub_st_daily where user='$user' && STR_TO_DATE(pdate,'%Y-%m-%d') = '$thisdate' ";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement