Well could you do something like this:

Connect to the database

retreive the entire table into an array,

run through the array for each product category (while $i < $category count)
and put a nested loop inside to create each dropdown list (or select (in
htm))

this then removes the need to connect to the database several times,
allthought you will have to loop through a multidimensional array, but that
would work

-- 
Luke
"Alex Hogan" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi All,
>
>
>
> I am converting a page from asp that is using several drop down lists.
Each
> list contains part of the product list based on the product type.  At the
> moment it is making a connection to the db and populating a list using the
> product type, closing the connection, then re-opening for another list.
>
>
>
> I can see that populating those drop downs like this is going to cause me
> tremendous problems in the future.
>
>
>
> I know there is an easier way to do this.  I wish I could think of it
right
> now..... any assistance would be appreciated.
>
>
>
>
>
>
>
> alex hogan
>
>
>
>
>
> ******************************************************************
> The contents of this e-mail and any files transmitted with it are
> confidential and intended solely for the use of the individual or
> entity to whom it is addressed.  The views stated herein do not
> necessarily represent the view of the company.  If you are not the
> intended recipient of this e-mail you may not copy, forward,
> disclose, or otherwise use it or any part of it in any form
> whatsoever.  If you have received this e-mail in error please
> e-mail the sender.
> ******************************************************************
>
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to