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 developing a PHP application which uses Twig (but that's unimportant) as the view
I am using PHP and Mysql for developing an application. we have two copies
I'm developing a PHP application in a IDE, and want to use Git for
I am currently developing a an application to allow users to search through a
I am currently building a gallery web application using php. I am currently developping
I am currently developing a facebook canvas (iframe) based application. Is there any way
I'm developing a niche social networking site that is going multilingual. That means our
i'm using YQL to send data back to an iPhone app i'm developing. I've
I have quite a few questions to ask about these issues. I'm an intern

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.