Jump to content

Recommended Posts

Dear all,

 

I have a problem I can't really wrap my head around, maybe someone here can help.

 

I read data from a xls-sheet every month and put it into a table.

To make it easy here, there are two things which I use to identify an entry: the date added and the product number. Both can't be unique, because the product number might be added the following month again. Here it might be more useful to not create a completely new entry in the database, but to just reference for what month the prouct should be listed. How can I do that?

 

My problem now is: when adding a new set of data, I want to select all new entries for the current month, that were not in the database last month. So I basically want to select all new entries, but not those, that were already in the database last month.

 

 

What is the easiest way to do that? Can I do it with one table, or should I use different tables that are referencing to each other?

 

Thank you for your help.

Best regards

Link to comment
https://forums.phpfreaks.com/topic/150308-question-on-limiting-a-select-statement/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.