lightfighter Posted July 13, 2009 Share Posted July 13, 2009 Hello all, I know I've posted this before, but I got myself really confused when attempting to play around with the help I got to work for other applications. Can anyone please help clear up my confusion? What I'm trying to do is (I hope I've got all the info needed for you to be able to understand what my goal is): I'm trying to set up a report section on an update for a PHP application. It is for a auto repair shop. The database is to track customer phone calls. The call_log table has all the information in it, with some of the data as foreign keys. The foreign keys are used because they want to be able to update some of the information and have it automatically populate in all the records that use that piece of information. They want to have a report generated where they can type in the store number and a date range and have the following information displayed: Store Number |Oil Change |Call Reason 2 |Total Calls 4315 (Hopkins) |3 total calls |2 total calls |5 total calls 5501 (Minneap) |1 total calls |6 total calls |7 total calls (They also want to be able to pull up this report for the district within a given date range, and have a complete total for the entire history.) With the call reasons (oil change) as a foreign key and have call reason 2 automatically generate when they add another reason for the call. The location in the call_log table is also a foreign key to the store table which pulls the store number and store name. They also want to have the different promotions (i.e. pay per click, toll free, etc.) listed in this table as well as secondary data being displayed (so that information listed after the total calls column) with the headers being pay per click and so on. However, if I know how to do it once, I can have the promotional data listed in another table just under this one. They do not want to change the foreign keys because they want the flexability to add, modify, or remove call reasons, store information, or promotions without having to change thousands of records. Is there a good tutorial or book that I can get that can teach me how to get this set up (and more importantly, understand what is going on and how the code works so I can be able to modify it and / or use it in the future for something else)? Thank you. Link to comment https://forums.phpfreaks.com/topic/165817-generate-report-help/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.