Ejemplo n.º 1
0
 public function activity_share_user_today_count($user_id)
 {
     $search_date = date(format_date_server());
     $condition = "act_time like '%" . $search_date . "%'";
     $this->db->where($condition);
     $query = $this->db->get_where('activity_history', array('act_type' => 'share', 'act_by_id' => $user_id));
     $rate_count = $query->num_rows();
     return $rate_count;
 }
Ejemplo n.º 2
0
 public function get_merchant_today_hotdeal_removed($merchant_id, $date = NULL)
 {
     if (!IsNullOrEmptyString($date)) {
         $search_date = $date;
     } else {
         $search_date = date(format_date_server());
     }
     $this->db->where('hide_flag', 1);
     $condition = "start_time like '%" . $search_date . "%'";
     $this->db->where('advertise_type', 'hot');
     $this->db->where($condition);
     $query = $this->db->get_where('advertise', array('merchant_id' => $merchant_id));
     return $query->num_rows();
 }
Ejemplo n.º 3
0
 function month_previous($theDate, $want_yearmonth = 0)
 {
     $currentDate = new DateTime($theDate);
     $lastMonth = incrementDate($currentDate, 0);
     if ($want_yearmonth == 1) {
         return $lastMonth->format('Y') . '-' . $lastMonth->format('m');
     } else {
         return $lastMonth->format(format_date_server());
     }
 }