close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

When more then one item is in cart, success page will result in error message

Thread began 9/14/2019 4:20 pm by Roxana | Last modified 9/16/2019 1:08 pm by Ray Borduin | 308 views | 2 replies |

Roxana

When more then one item is in cart, success page will result in error message

Error message:
INSERT INTO orderdetails (`DetailsID`, `DetailOrderID`, `DetailItemID`, `DetailArticle`, `DetailItemName`, `DetailItemDesc`, `DetailQuantity`, `DetailPrice`) VALUES (2, 2, 2, 2, 2, 2, 2, 2)

Duplicate entry '2' for key 'PRIMARY'

The problem is, that I could not figure out what to put in as default values when converting DB summary and DB details behaviors to MySQLi. What I entered worked fine if only 1 item (1 item id) was in the cart, but if more than one item id was in the cart, it doesn't work.

I don't need any of the DB entries except for the order_id, so that the order numbers will be unique. Actually I would prefer not to have any information except the order_id due to European privacy laws.

Sign in to reply to this post

Ray BorduinWebAssist

You shouldn't set a value for DetailsID... that is an autonumber key column... just delete line 504 so no value is specified for that field.

Sign in to reply to this post
Did this help? Tips are appreciated...

Roxana

That works. Thanks, Ray.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...