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 8705961
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:29:41+00:00 2026-06-13T03:29:41+00:00

SQL Query SELECT,ORDER date Hi, I need to select the date from my table,

  • 0

SQL Query SELECT,ORDER date

Hi, I need to select the date from my table, the problem is that I have above 130 rows and it will grow every day. I want to short it and in the query to select the date that equal for today date=date("Y-m-d") and the date that bigger from the date of today.

It can be a variable the date of today because I’m using a date selection to paginated between the dates. I know I can use timestamp but I dont know how to implement it in the query.

  $r = mysql_query("SELECT  date FROM yoman  ORDER BY date ASC,time ASC  ") 
            or die(mysql_error()); 

I hope you will unserstand, http://attiatech.com/projects/tours/index.php?db=cmVsXzIwMTI= this is the link, try to pick the 1.10.2012 and see how many rows are printed, i have the second option of view paginated but i want in this query to filter it too.

  • 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-06-13T03:29:42+00:00Added an answer on June 13, 2026 at 3:29 am

    I assume you store the date as string “Y-m-d”.

    It might be better to use this though as table column type:

    http://dev.mysql.com/doc/refman/5.1/en/datetime.html

    So e.g.:

    $startdate= date("Y-m-d", $day); 
    $enddate= date("Y-m-d",strtotime("+1 day", $day)) - 1; 
    

    SQL to fetch one day goes like this:

    SELECT * 
    FROM yoman 
    WHERE date BETWEEN $startdate AND $enddate 
    ORDER BY date ASC,time ASC
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have this sql query select * from table where name like ? but
I written a query in my sql like this: select * from table_name order
SQL query: SELECT ArticleCategories.Title AS Category, Articles.Title, Articles.[Content], Articles.Date FROM ArticleCategories INNER JOIN Articles
i have sql query select * from Roles Join Users On Roles.Role=Users.RoleId it return
i need Sql query Convert Table1 to Table2 select Count(Page) as VisitingCount,CONVERT(VARCHAR(5),Date, 108) as
I have a multi-table SQL query. My need is: The query should I generate
Background: Entity Framework 4, with SQL Server 2008 Problem: I have a table Order
I have a SQL query that takes a date and reports number of pallets
I have the following SQL query: SELECT r.BEZEICHNUNG AS BEZEICHNUNG, r.ID AS ID, ra.BEZEICHNUNG
This is my SQL query: select name,description from wp_widget_custom where name in ('hemel-hempstead','maidenhead', 'guildford','bromley','east-london','hertfordshire','billericay','surrey')

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.