php and mysql

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
negar
Forum Newbie
Posts: 9
Joined: Mon Mar 15, 2004 10:36 am

php and mysql

Post by negar »

i have a CustDetails table with attributes
ID
Username
....

and

Products table with attributes
ProdID
Prodname
....

and

cart table with attributes
cartID
ProdID
ID

i was wondering there was any way that when a user selects the add item link that the item is added to the cart table but also the ProdID and the users ID. i need an insert statement that will link the CustDetails.ID to cart.ID and Products.ProdID to cart.ProdID.
can anyone help me?
Thanx
Steveo31
Forum Contributor
Posts: 416
Joined: Sun Nov 23, 2003 9:05 pm
Location: San Jose CA

Post by Steveo31 »

Maybe...

INSERT INTO cartID, prodID, userID VALUES ('$cartID', '$prod', '$name');

?
Post Reply