ok i need to put Upsell items underneath the "add upsell items" form, so that 
they can see what upsell products they currently have for that product.

(mysql 5 btw)

So it is all good but then they asked for me to make it "sort-able" and that is 
causing me a headache and can't quite get that last bit in there correctly.

3 tables and the fields I need from them

upsell
upsell_id, product_id, upsell_product_id, upsell_sort

products
product_id, brand_id, product_item

brands
brand_id, brand_name

product id is taken from url
upsell_product_id is just a second product_id field(so product_id might be 19 
and upsell_product_id might be 25, which is just actually product 25)

So i get and filter the actual product by url.id then I need to grab any 
matching records in the upsell table and get the upsell_product_id and then 
match that to a product in the product table and then match that to a brand in 
the brand table.

-----------------------------------------------

On the page I am showing this

Brand    |  Product    |  Sort  |  Delete

I can use this to get close to what I need but it doesn't have the sort from 
upsells and the (20,21) would be a list that I need to get the product info on 
(would need to be from a previous query.

        select          brands.brand_id, brands.brand_name, brands.brand_logo, 
products.product_id, products.brand_id, products.product_item, 
products.category_id, products.product_image, products.product_archived, 
products.product_discontinued
        from            products, brands
        where           products.brand_id = brands.brand_id
        and     products.product_id  in (20,21)
        order by        brands.brand_name asc, products.product_item asc

any good suggestions?


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion 8 - Build next generation apps
today, with easy PDF and Ajax features - download now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293705
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to