Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

PHP MySQL mktime weekly data

Posted on 2011-02-25
1
Medium Priority
?
441 Views
Last Modified: 2012-05-11
I have a visitors log table with the time in the mktime format. I want to generate the weekly report based on this data. How can I do weekly increment of the mktime from min mktime to the max mktime. I need to count the weekly hits from this.
0
Comment
Question by:PranjalShah
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 3

Accepted Solution

by:
Zakabog earned 2000 total points
ID: 34985258
<?php

$minTime = mktime(); // Your starting mktime
$maxTime = strtotime("+1 week", $minTime); // One week after your starting mktime

echo date("Y-m-d", $minTime) . " - " . date("Y-m-d", $maxTime); // Print out your $minTime and $maxTime to show you it's working

?>
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question