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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:11:15+00:00 2026-06-17T04:11:15+00:00

I am working on a project which keeps a record of lets say amount

  • 0

I am working on a project which keeps a record of lets say amount of money spent in a day.
Lets say the beginning day(first entry) in the database is 1-Jan-2013.
Now everyday I will submit an entry to the database but on some days I cant. The table looks like this:

Date______|______Spent

2013-01-09 | 2000

2013-01-11 | 1200

Lets suppose today is 11-jan-2012 and I forgot to make an entry on 10-jan-2012. Now I want to write the code using php+mysql, which will go through the table and check if there are any dates missing between the first entry and the latest entry. And when it finds that the entry for the day 10-jan-2012 is missing, it should create the entry itself with amount 0 in the spent column. How can I achieve this? Is there any better approach then the one I am trying to use?

  • 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-17T04:11:16+00:00Added an answer on June 17, 2026 at 4:11 am

    Only way to accomplish this is to JOIN on a table that has a full calendar or make a table of dates. You could write a cursor, but it’s considered a last resort.

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

Sidebar

Related Questions

I'm working on a project, and Firebug keeps on reporting a nsLoginManager error (which
I am currently working on a php/javascript project which retrieves information from a database
I'm currently working on my first MVC project which is nothing more than a
Can anyone help me find an up-to-date, working ATL project which has a main
Iam working on a project which involves writing a Mork File (Mork is a
I'm working on a project which contains several slave nodes and one master node.
I'm working on a project which involves two processes, let them be A and
I started working on a project which uses Net_URL_Mapper from PEAR (php) as the
I'm working on a project which needs to use youtube api. The html and
I am working on a project which lists file sharing urls from the likes

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.