On 12/16/2011 12:56 PM, DealTek wrote: >> >> >> what about creating a master report that has the total summarized by >> category and then offering a drill thru type structure to dig deeper >> in certain areas? > > > > - Hi Bastien, > > That's a cool idea. In this case they want it on a longer single page so they may save or print all at once. > > A while back - I remember doing a query for let's say just the unique product names - then as I looped though them in a table - I did a sub query for all records with that product name.... and did a 2nd loop in a second table to show them.... It ended up working like I wanted but I'm not sure if this was the best way to do it.... > > > --------- > > also > > also while I am testing I am trying to loop through the query 2 times > > table 1 > > i tell it to show records if they meet criteria 1 > > then do again in table 2 > > table 2 > > i tell it to show records if they meet criteria 2 > > but the table 2 only shows 1 record > > Q: ... like the query number row number? needs to be reset - but how? > > > > > ----- like ... > > like---- 2x ... > > <?php do { ?> > > <?php if ($row_get1['loc'] = 'back') { ?> > > <tr> > <td><?php echo $row_get1['id']; ?></td> > <td><?php echo $row_get1['loc']; ?></td> > <td> </td> > <td> </td> > <td> </td> > <td> </td> > </tr> > > <?php }; ?> > > <?php } while ($row_get1 = mysql_fetch_assoc($get1)); ?> for the above to work right, you will need to loop through the mysql result set one time. Placing all the results in to one large array. Then you can loop through the array as many times as needed. What you will probably find is that you can sort all the data into the proper order withing your SQL statement. Then display the data looping through the mysql result set once without having to create the additional array mentioned in my first statement above. > > > >> >> >> -- > > -- > Thanks, > Dave - DealTek > dealtek@xxxxxxxxx > [db-11] -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ http://www.bendsource.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php