Drauka Posted March 20, 2009 Share Posted March 20, 2009 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 Quote Link to comment https://forums.phpfreaks.com/topic/150308-question-on-limiting-a-select-statement/ Share on other sites More sharing options...
fenway Posted March 27, 2009 Share Posted March 27, 2009 I'm not sure I understand what the problem is... are you updating data or adding new data every month? Quote Link to comment https://forums.phpfreaks.com/topic/150308-question-on-limiting-a-select-statement/#findComment-795250 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.