Jump to content

[SOLVED] MYSQL query questionm, please help me.


Recommended Posts

Hey guys,

i'm currently trying to code my own shopping cart and have run into a little snag, I'm hoping someone here can help me.

 

i have two tables in my database which i need to comunicate between. The tables are as follows:

 

products -  this stores the product information (productnumber, productname, price)

cartitems - this stores the things the user has added to cart.

 

basically, what i need to do is run a query that will search through the cartitems table and find the correct info from the products table.

 

so lets say in my cart items table i have a productid that is "1" i need to search the products table and find the item where the id="1" and display the productnumber and productname.

 

how would i go about doing this?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.