redarrow Posted July 6, 2006 Share Posted July 6, 2006 Does this way of thinking to design a basket correct please cheers.Add to basket databaseusers_idiptimedateproductpricelet the user see the items in basketselect statementlet the user delete items delete satementcopy the whole added basket to the users members page on checkoutupdatethen delete the basket database via the users_id as the user got a copy in member viewdelete Quote Link to comment https://forums.phpfreaks.com/topic/13878-basket-help-cheers/ Share on other sites More sharing options...
craygo Posted July 6, 2006 Share Posted July 6, 2006 You would also want quantity. Probably just the productid as well. All other information would come from the product table anyway.user_idiptimedateproductidquantityWhen order is paid you can move data into an "orders" table which will assign an order id along with holding the user_id. This way you will have a history of orders for lookup.Ray Quote Link to comment https://forums.phpfreaks.com/topic/13878-basket-help-cheers/#findComment-54056 Share on other sites More sharing options...
redarrow Posted July 6, 2006 Author Share Posted July 6, 2006 was not far out then ha lol..................know the full database lol.what you think my man lol.......................members_databasemembers_id // members idmembers_name // members nameemail // members emailmembers_phone_number // contact numbermembers_address // addressinfodate_registred // registration dayeend_date // subcription one yearip // members ipproduts for sale databaseproduct_id //poduct idproduct_name //product namehow_meny // how many there areproduct_price // price of itembasket databasemembers_id // users id of buyermembers_name //users name of buyertime // time buy productdate // date buying productip // members ipproduct_id // product idproduct_name // product namehow_many // how many buyingproduct_price // how muchbasket database copy for members members_id // users id of buyermembers_name //users name of buyertime // time buy productdate // date buying productip // members ipproduct_id // product idproduct_name // product namehow_many // how many buyingproduct_price // how much$query="SELECT SUM(product_price) FROM basket where members_id='$members_id' ";To sum up a total is this correct. Quote Link to comment https://forums.phpfreaks.com/topic/13878-basket-help-cheers/#findComment-54090 Share on other sites More sharing options...
craygo Posted July 13, 2006 Share Posted July 13, 2006 you may want to have a "orders" tanle as well. This will hold the order once it is purchased with an orderid. This way you have a historyThe basket will ultimately be a temporary table which would be transfered to the order table once purchase is made.I do not think you would need the product name in the basket or the order, just the productid. All information should be linked. Same with the member name.members_databasemembers_id // members idmembers_name // members nameemail // members emailmembers_phone_number // contact numbermembers_address // addressinfodate_registred // registration dayeend_date // subcription one yearip // members ipproduts for sale databaseproduct_id //poduct idproduct_name //product nameqty_on_hand // how many there areproduct_price // price of itembasket databasemembers_id // users id of buyertime // time buy productdate // date buying productip // members ipproduct_id // product idhow_many // how many buyingproduct_price // price of item at time of purchase since prices may changeOrder Databaseorder_id //Order numbermembers_id // users id of buyertime // time buy productdate // date buying productip // members ipproduct_id // product idhow_many // how many buyingproduct_price // price of item at time of purchase since prices may changeYour query looks fine to me.Sorry for late response.Ray Quote Link to comment https://forums.phpfreaks.com/topic/13878-basket-help-cheers/#findComment-57337 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.