Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3284328
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T20:08:32+00:00 2026-05-17T20:08:32+00:00

I am developing a PHP application which will handling many company articles. Now I

  • 0

I am developing a PHP application which will handling many company articles.

Now I am creating a page which should order articles BY DATE ie all articles created in a certain day are shown with the appropriate heading and so on for all the articles.

I have used Unix timestamps to save the dates in the MySql db but I cant find code which only sorts dates by days. Can I please get some assistance.

Thanx

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T20:08:33+00:00Added an answer on May 17, 2026 at 8:08 pm

    You can use mktime() to get the timestamps you would want to use to bin the entries:

    http://us.php.net/manual/en/function.mktime.php

    $timestamp_for_my_birthday = mktime(0,0,0,10,16,1984);
    $timestamp_for_the_next_day = mktime(0,0,0,10,17,1984);
    
    if($time > $timestamp_for_my_birthday && $time < $timestamp_for_the_next_day){
        // Time is on my birthday
    }
    

    To make this into a MySQL query:

    $SQL = "SELECT * FROM dates WHERE date > $timestamp_for_my_birthday AND date < $timestamp_for_the_next_day;";
    

    To order by date I think it would go something like:

    SELECT * FROM dates ORDER BY FROM_UNIXTIME(time, ‘%M %d %Y’);

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently developing a PHP application that's using an Access database as a backend.
I am developing a PHP/MySQL application using vertrigoserver. I need to enter the German
I'm developing an object-oriented PHP website right now and am trying to determine the
So I am just starting out developing PHP web applications and have finished setting
I'm using NetBeans 6.5 for developing PHP and I have xdebug setup. Is there
I'm developing a PHP website that uses url routing. I'd like the site to
I am developing a PHP-based login system. Each user has an ID(a number) and
I'm thinking about developing my own PHP based gallery for storing lots of pictures,
I am developing a website using CodeIgniter and PHP. Some of my friends suggest
I'm developing a website in PHP and I have large JS files that I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.