Re: comparison table script

From: Date: Fri, 23 Mar 2001 15:37:34 +0000
Subject: Re: comparison table script
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-7725@lists.php.net to get a copy of this message
You can get an idea here of what I would like to do http://www.bestbuy.com/ComputersPeripherals/DrivesStorage/CDRW.asp?m=488&cat=511&scat=514 So all information is displayed side by side, most of the time used to help decide between 2 or 3 products [bestbuy limits 10 selections in their comparison] The array is the part I need help with. I am not sure if what I had thought was the right track to pursue. Thanks much, olinux --- Miles Thompson <milesthompson@ns.sympatico.ca> wrote: > This isn't going to be the most helpful answer, > because I'm wondering why > you'd want to do this in the first place. > > All you really have to do is create a new array from > the existing result > set, transposing the columns. > > The number of elements in the array will be the > number of car_ID's that are > returned, the number of rows in the array will equal > the number of > attributes (columns) in the result set. > > Stepping through the result set and building the new > array will be a rather > interesting exercise in nested loops as you will be > repeatedly going > through the results set for each of ID, make, model, > and color. > > After this array is built, then I'd worry about > displaying it. > > Before that, however: > Is it so important that the order of display be > rearranged? Really, > what's the difference? > What if 8 cars are returned instead of 3? What > if 20? Your table will > blow out to the right, something users don't like. > How do you plan to have users select the cars > they want more > information about? > > Only you can answer these, and maybe you have. In > which case, good luck. > > Miles Thompson > > __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/

« previous php.db (#7725) next »