View Single Post
  #6 (permalink)  
Old 18-03-05
dmorison dmorison is offline
Registered User
 
Join Date: Mar 2004
Location: Stafford, UK
Posts: 311
Thanks: 1
Thanked 2 Times in 1 Post
dmorison is an unknown quantity at this point
Hi Daniel,

It would make more sense to "fill in the blanks" in your application rather than make 31 separate queries. Logically, they achive the same result anyway.

Use a query to select data for the whole month - along the lines of what OLBG suggests above; and then loop through the result creating a new array that either contains the data from the query for a particular day, or zero if no data exists. Then construct your report from the new array.

If you can post the actual query that you are using at the moment we should be able to help out with some PHP code for the intermediate step...
__________________
Price Comparison Script
Reply With Quote