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

  • Home
  • SEARCH
  • 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 7750075
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T11:11:47+00:00 2026-06-01T11:11:47+00:00

I have this little script that shows one wisdom each day. so I have

  • 0

I have this little script that shows one wisdom each day.

so I have three columns.

Id         wisdom          timestamp
1          wisdon 1        4/1/2012
2          wisdon 2        4/1/2012
3          wisdon 3        4/2/2012

and I want to fetch array of one wisdom for each day

I looked around your website, but unfortunately I didn’t find something similar to what I want.

also I got this code

$sql = mysql_query("SELECT DISTINCT id FROM day_table group by timestamp");

but this also not working.
any ideas?

is it possible to make a counter of 24 hours update wisdom date?
please give me some help.

  • 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-01T11:11:48+00:00Added an answer on June 1, 2026 at 11:11 am

    You can make another table that is called wisdom_of_day

    The table would have the following columns, id, wisdom_id, date

    Basically each day you can randomly select a wisdom from your wisdom table and insert it into the wisdom day table. You can also add a constraint to your date column so it is distinct. It is important that it is a date column and not a timestamp since you don’t care about time.

    Then you can retrieve the wisdom of the day by querying based on the date.


    It’s possible I read your question wrong and you just want to select one wisdom for each day, but you want to show multiple days and you want to get the data from your table.

    If so, the reason your query is not working is because you are grouping by a timestamp which includes the date and time. You need to group it by date for it to group like you want.


    Here is a query that will group by the day correctly. This will only work if you have a timestamp field and are not storing a unix timstamp on an int column.

    select id, wisdom, date(timestamp) date_only from day_table group by date_only order by date_only asc;
    

    Hmm, I noticed that your timestamp values are in some kind of date format, maybe as a string? If so the above query probably won’t work.

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

Sidebar

Related Questions

I'm using this script that shows a little warning when a user clicks on
I have written a little bash script that reads commands (one per line), in
I have this little script to toggle a contact form when a button is
This is a little tricky so bear with me: I have a PHP script
I have this little problem, that I cannot figure out which arguments to pass
I have this little question that's been on my mind for a while now.
I have a a login in script that is a little to complicated for
We have some html that looks like this: <form id=MyUserControl runat=server method=post> <script language=javascript
I have a little web app that uses the Facebook like widget. This page
I have a django template that looks like this: <head> <script src=http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js type=text/javascript></script> <script

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.