473,767 Members | 2,152 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PHP Shopping Basket

Hi,
I've been working on a PHP Shopping Basket and have hit a problem.
I wanted update the DB with the contents of the Array which forms the
basket.

This isn't a problem, however i'm unsure how i use Relational Tables
in MySQL.

I have a table called Orders, which stores the CustomersID and also
has an OrderID (this is an autoincrement integer)

I then want to take the OrderID and put it into the OrderItems table
along with the data from the Shopping cart array.

What's the best way to structure this?
All i can think of is a string of messy sql statements.

Any help would be appreciated.

Ian
Jul 17 '05 #1
0 1672

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2299
by: Harry Koh | last post by:
Bonjour I'm looking for a script of a caddy / shopping cart / basket in php/mysql - multilangage - Easy to integrate in an existing interface - easy to handle "in-a-minute" ( NECCESSARY) - really easy to use (don't want to have days and days of work) functions :
6
2274
by: Fnark! | last post by:
I am creating a shopping cart using PHP Version 4.1.2. I am creating and registering a cart object in a session. The cart object contains an array of arrays called $order whose elements are a collection of $orderline associative arrays which, in turn, hold the global POST values key 'order_code' and value 'qty' as passed in from another page. My problem is (shown by using print_r to print out the contents of the arrays) each time I...
4
1823
by: Richard Pain | last post by:
OK - I have a shopping basket with data in a database. Once the person has successfully completed their order I want to be able to send them an email with the products ordered roughly in the following format: Product Price Quantity prod1 £6.99 1 prod2 £5.99 2 Postage ...
3
1873
by: Samuel Shulman | last post by:
Hi I need to implement a shopping basket for my e-commerce website Scenarios are as follows 1. Website to offer shopping basket for all visitors including those who didn't log 2. Website to offer shopping basket ONLY to those that are logged
11
2001
Fary4u
by: Fary4u | last post by:
Hi i've design the ASP shopping with MS Access database it's working fine there is no problem in LOCALHOST when i upload into the Host Server it's working fine but when u add product into basket it's bring automatically 1 extra product some time 2 or some time 3 i've not made a file called GLOBAL.asa for generate session but if some body add item into the basket it takes OrderID & using Session .
0
1812
by: Shanthini Ganesh | last post by:
hi all. now i m creating shopping cart. i would like to make when the user click the add to basket button, item added visually shown to user. i found one script for this in net.. but i couldnt pass dynamic productid to that addtobasket javascript function. this is my function.. function addToBasket(productId) { if(!shopping_cart_div)shopping_cart_div = document.getElementById('shopping_cart'); if(!flyingDiv){ flyingDiv =...
0
1029
by: jasone | last post by:
Hi all and happy new year! so here's my little problem, im developing a shopping cart for a florist. there will be a traditional shopping cart where the user adds item to basket and so on. i am struggling getting my head round an additional features which will allow the user to create their own bouquet. this will involved a 'flowers_details' tables where the user can select what flowers they want in their basket. when they finish choosing...
3
1173
by: jasone | last post by:
Hi all and happy new year! so here's my little problem, im developing a shopping cart for a florist. there will be a traditional shopping cart where the user adds item to basket and so on. i am struggling getting my head round an additional features which will allow the user to create their own bouquet. this will involved a 'flowers_details' tables where the user can select what flowers they want in their basket. when they finish choosing...
4
1898
Fary4u
by: Fary4u | last post by:
Hi for the last few months i've just stuck in 1 error & i don't know how to figer it out could any body find out where is the problem gonna be ? it's working fine but when u add product into basket it's bring automatically 1 extra product some time 2 or some time it's working fine i think so problem with GLOBAL.asa File that's not generating proper session variable GLOBAL.asa Sub Application_OnStart
0
9405
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10169
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9960
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9841
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8838
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5280
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5424
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3930
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3533
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.