pdxkar Posted December 1, 2016 Share Posted December 1, 2016 On the Shipping Information page, when a phone number is provided that has an area code greater than "214", after the "continue on to billing" button is clicked, the following error results: "An error occurred in script 'C:\wamp64\www\effortlessECommerce\effortless_ecommerce_2nd\ex2\html\checkout.php' on line 158: Your order could not be processed due to a system error." This is because the add_customer stored procedure's "p" (aka "phone") parameter is stored as an "int", and ints have a maximum value of 2,147,483,647. Therefore, a phone number with an area code larger than 214 will fail. I fixed the error like this: 1) Go to PHPMyAdmin. 2) Click "Procedures" 3) Click the "edit" button next to "add_customer" 4) Scroll down to the second to last row and change parameter "p" from an "int" to a "char". 5) Change parameter "p"'s "length/values" field from blank to "10" (no quote marks). 6) Click "Go" button. Now it "works on my machine". Link to comment Share on other sites More sharing options...
Larry Posted December 2, 2016 Share Posted December 2, 2016 Blargh! That surprises me that I did that. Sorry about the hassle, but kudos for figuring it out and thanks for posting the solution! I'll get that corrected. Link to comment Share on other sites More sharing options...
daddytiger Posted December 21, 2016 Share Posted December 21, 2016 Couldn't find a post I made on this in my "history" here, but it's living on previous pages:http://larryullman.com/forums/index.php?/topic/2862-ex2-coffee-site-customer-phone-number-string-not-integer/(Same fix from SQL POV), cheers Link to comment Share on other sites More sharing options...
Recommended Posts