Jump to content

Question on limiting a select statement


Drauka

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.