473,322 Members | 1,347 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Posting to SQL table problem?

3
I recently had a program written in php for e-commerce, but there seems to be a problem with the posting of the cart id to the SQL table. The designer is no longer available for questions, so I had hoped to get some help here. I have a brief knowledge of php, but just cant seem to track the problem down.

There are two tables used for the cart:

store_shopping_cart and
store_shopping_cart_items

Everything works fine until you try to add an item to the cart. It tries to enter a null value into store_shopping_cart_items for the column shopping_cart_id

The shopping cart id obviously cannot be null or there could be major confusion between different customers.

I know you need more information and to look at the code to give me an answer, but there are many dependent php files (classes.php,common.php, etc.) I didnt want to post them all here and waste a bunch of space..

Could some1 contact me and help me track this problem down? I'd like to get the site up and working asap because its a much better design than our current site.

Thanks
TimmyC
TimmyC@5thavenuebling.com
Feb 2 '07 #1
3 1162
Motoma
3,237 Expert 2GB
I recently had a program written in php for e-commerce, but there seems to be a problem with the posting of the cart id to the SQL table. The designer is no longer available for questions, so I had hoped to get some help here. I have a brief knowledge of php, but just cant seem to track the problem down.

There are two tables used for the cart:

store_shopping_cart and
store_shopping_cart_items

Everything works fine until you try to add an item to the cart. It tries to enter a null value into store_shopping_cart_items for the column shopping_cart_id

The shopping cart id obviously cannot be null or there could be major confusion between different customers.

I know you need more information and to look at the code to give me an answer, but there are many dependent php files (classes.php,common.php, etc.) I didnt want to post them all here and waste a bunch of space..

Could some1 contact me and help me track this problem down? I'd like to get the site up and working asap because its a much better design than our current site.

Thanks
TimmyC
TimmyC@5thavenuebling.com
Welcome to The Scripts, TimmyC.
What type of SQL are you using?
You will need to set the column to be Autoincrement (MySQL) or Identity (MSSQL).
Feb 2 '07 #2
TimmyC
3
Thak you for the reply.

I do believe it to be an autoincrement problem. Do you think the difference between postgreSQL and MySQL would create the problem?

The cart_id table posts correctly, its just when it tries to reference the cart_items it pulls a null value. Would changing the column from not null help?

just a few thoughts..

TimmyC
Feb 3 '07 #3
Motoma
3,237 Expert 2GB
The cart_id table posts correctly, its just when it tries to reference the cart_items it pulls a null value. Would changing the column from not null help?
Yes.

Sorry for such a short answer.
Feb 3 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Mark | last post by:
Hi - when I add (dynamically) a row to a table, which includes a checkbox, I want the value of the checkbox to be posted along with the other controls already on the form when the form is...
3
by: Carl Lindmark | last post by:
*Cross-posting from microsoft.public.dotnet.languages.csharp, since I believe the question is better suited in this XML group* Hello all, I'm having some problems understanding all the ins and...
0
by: Rolan | last post by:
I know what I want to do regarding the average cost for inventory, but need some assistance to sort out some of the details to finalize an inventory table and query. Essentially, the information is...
5
by: m_t_hill | last post by:
Running MS Access 2000 MS Windows XP Pro This has caused me a lot of hair loss in the last few days so would appreciate any help. I am running code to append/update a local access database...
6
by: W. Jordan | last post by:
Hello Gurus, I am developing an ASP.net forum in our intranet. The design specification requires that the forum provides a way for the users to post anonymously. Here's the structure of the...
1
by: gelangov | last post by:
I am sorry, I am posting this message again, since I did not get any reply. I want to export a table into a "fixed width" file using SQL 2005 import export wizard. This is the version I have:...
1
PEB
by: PEB | last post by:
POSTING GUIDELINES Please follow these guidelines when posting questions Post your question in a relevant forum Do NOT PM questions to individual experts - This is not fair on them and...
1
by: gnawz | last post by:
Hi guys, I have a couple of php files that perform various tasks. I will use fields in my system and provide code as well I need help as follows: My database contains the fields Category...
5
Thekid
by: Thekid | last post by:
Hi, I'm using xampplite and I'm trying to make a guestbook and a forms page where you can post to the guestbook with PHP & MySQL. I got the code from a website but it wasn't working so I tinkered...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.