This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Dreamweaver > August 2004 > PHP MySQL Advanced query





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author PHP MySQL Advanced query
alwaysabitlost

2004-08-05, 11:14 pm

Hi Guys

I'm trying to add a feature to my shopping cart. In the right hand column of
the screen are "New items", which pulls out all the latest products, "Similar
items", which pulls out items from the same category as the item the user is
currently viewing, and finally "Complimentary items", which is where I'm
getting unstuck.

What I'm trying to do is to get some code to look at the basket/cart table,

(which holds the users session, quantity, product id number and it's
"category" and the date they added it,)

pick out all the users items,

grab hold of the cat_ids for each of these items,

then use those to query the database again and say "find items in the same
categories, but don't pull up any items that the user already has in his or her
basket."

Anyone got any ideas?

Thanks

alwaysabitlost

2004-08-06, 7:14 pm

Hurrah, I managed it!
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews