Ask a Question related to Dreamweaver AppDev, Design and Development.
-
NoQuarter #1
Help needed in inserting / updating tables withDreamweaver
Hello. Just registered. I am building an OnLine CD-Shop for a class in college
and I have some problems. I'll get right to the point:
I am using Dreamweaver MX 2004 with SQL Server 2000 and ASP with VB Script
I have problems in making Dreamweaver do multiple things. What I mean is:
1) I have two tables: the customer_order table which stores data concerning
the purchase minus the actual products (Table: customer_order - Collumns :
order_id{PK}, customer_id, purchase_method_id, order_date) and the order_items
table which stores the products that correspond to each purchase (Table:
order_items - Columns: order_id{PK}, product_id{PK})
2) What I want to do is for dreamweaver upon the submition of the checkout
form which lists all the data mentioned above is to do two major things:
a) Insert the relative data in the customer_order table once (I have done that)
b) Insert the product_id data of the form in the order_items table with the
same order_id that is used in the customer_order data. And on top of that it
must insert the data multiple times, one time for each product in the checkout
form. :D
To give you an example:
*****Form*****
Customer Id = 1
product_id = 1
product_id = 2
product_id = 3
*****************
When checkout is pressed by the user this is what I want to happen to the
tables (assume the table where empty before)
customer_order
order_id = 1 (it is handled automatically by the database)
customer_id = 1
...
order_items
order_id = 1 | 1 | 1
product_id = 1 | 2 | 3
And I want all this things to happen simultaneously.
Now I haven't figured out two things: The first one being how can Dreamwever
insert data into multiple tables (two in this specific example) and second, and
probably more importatnt, how can Dreamweaver insert multiple rows of data into
a single table.
I have some programming experience and for the latter case I assume I could
use some kind of 'for' loop where it counts the number of products and then it
somehow repeats the insert process for the count of the number of products...
But I cannot figure how to do that with the Dreamweaver generated code.
Anyway I would really appreciate some help because this is my greatest (and
probably last) problem with this project and the deadline is in 1 1/2 weeks.
Thank you in advance.
NoQuarter Guest
-
Having trouble inserting/updating, please look @ code
Hello, I'm getting an error while trying to insert a record from a form, or update a record from the datagrid. ERROR: at... -
Problem inserting/updating records
Hi I'm having trouble trying to insert/update the records in SQL Server. I have created a form based on two tables and created a select... -
Updating and Inserting simoultaneously
hello not sure if this is possible, i need to update a field in a table and then insert a new record into a different table from when the user... -
Updating/inserting >> Linking table
A dilemma: If I am attempting to add multiple products to an existing Customer-Products linking table do I do this via an Insert or Update? ... -
Much needed help with updating tables
I have two tables. One is a static table where I have one field that is used as a combo box field in a form. I am trying to update the second... -
Paul Whitham TMM #2
Re: Help needed in inserting / updating tables with Dreamweaver
There is a tutorial on [url]www.charon.co.uk[/url] on how to do an insert into multiple
tables.
--
Regards
Paul Whitham
Macromedia Certified Professional for Dreamweaver MX2004
Valleybiz Internet Design
[url]www.valleybiz.net[/url]
Team Macromedia Volunteer for Ultradev/Dreamweaver MX
[url]www.macromedia.com/support/forums/team_macromedia[/url]
"NoQuarter" <webforumsuser@macromedia.com> wrote in message
news:d61kqk$km0$1@forums.macromedia.com...college> Hello. Just registered. I am building an OnLine CD-Shop for a class inScript> and I have some problems. I'll get right to the point:
>
> I am using Dreamweaver MX 2004 with SQL Server 2000 and ASP with VBconcerning>
> I have problems in making Dreamweaver do multiple things. What I mean is:
>
> 1) I have two tables: the customer_order table which stores dataorder_items> the purchase minus the actual products (Table: customer_order - Collumns :
> order_id{PK}, customer_id, purchase_method_id, order_date) and thecheckout> table which stores the products that correspond to each purchase (Table:
> order_items - Columns: order_id{PK}, product_id{PK})
>
> 2) What I want to do is for dreamweaver upon the submition of thethat)> form which lists all the data mentioned above is to do two major things:
> a) Insert the relative data in the customer_order table once (I have donethe> b) Insert the product_id data of the form in the order_items table withit> same order_id that is used in the customer_order data. And on top of thatcheckout> must insert the data multiple times, one time for each product in theDreamwever> form. :D
>
> To give you an example:
>
> *****Form*****
>
> Customer Id = 1
>
> product_id = 1
> product_id = 2
> product_id = 3
>
> *****************
>
> When checkout is pressed by the user this is what I want to happen to the
> tables (assume the table where empty before)
>
> customer_order
> order_id = 1 (it is handled automatically by the database)
> customer_id = 1
> ...
>
> order_items
> order_id = 1 | 1 | 1
> product_id = 1 | 2 | 3
>
> And I want all this things to happen simultaneously.
>
> Now I haven't figured out two things: The first one being how cansecond, and> insert data into multiple tables (two in this specific example) andinto> probably more importatnt, how can Dreamweaver insert multiple rows of datacould> a single table.
>
> I have some programming experience and for the latter case I assume Ithen it> use some kind of 'for' loop where it counts the number of products andproducts...> somehow repeats the insert process for the count of the number of(and> But I cannot figure how to do that with the Dreamweaver generated code.
>
> Anyway I would really appreciate some help because this is my greatestweeks.> probably last) problem with this project and the deadline is in 1 1/2>
> Thank you in advance.
>
Paul Whitham TMM Guest



Reply With Quote

