1 Reply Latest reply on Jan 27, 2011 9:41 AM by philmodjunk

    Need help with relationship



      Need help with relationship


      I have a DB that has a table for prices, a table for comleted products, and a table for billing, and a table for customers. I need to get the DB to fetch all of the data since the last billing cycle and generate a bill of all the completed products for the particular customer. However, I don't know what the best way to that is other than doing a huge massive scipt that will require lots of time if a price changes or another customer comes on board.

        • 1. Re: Need help with relationship

          Don't see why you'd need such a complicated script, but can't give detailed advice without knowing more about your database system.

          Seems like all you'd need to do is perform a find on your billing tabled for all billing records for products created since a specific date--a date that the script can determine from the date of the previous billing cycle. Price changes and new customers shouldn't have a major impact on that as that should result in records created and/or updated since the last billing cycle.