Re: [phpshop] Database Error on Checkout

3 views
Skip to first unread message
Message has been deleted

Jeff Newman

unread,
Dec 21, 2008, 11:11:27 AM12/21/08
to php...@googlegroups.com
right after "194.22, 0," in your data, you have a blank space (between the
two commas) that is not wrapped in quotes. mysql doesn't like that.

----- Original Message -----
From: "philomniglot" <philom...@gmail.com>
To: "phpShop" <php...@googlegroups.com>
Sent: Sunday, December 21, 2008 9:53 AM
Subject: [phpshop] Database Error on Checkout


>
> I have processed a test credit card order before, but now when I try,
> I receive the following database error on "Complete Order":
>
> ======
> Database error: Invalid SQL: INSERT INTO orders (user_id, vendor_id,
> order_number, user_info_id, ship_method_id, order_subtotal, order_tax,
> order_shipping, order_shipping_tax, order_currency, order_status,
> cdate, mdate) VALUES ('7322f75cc7ba16db1799fd8d25dbcde4', 1,
> '95a8b0170755662ecd20777245a56c30', 19, '', 194.22, 0, , 0, '', 'P',
> 1229871131, 1229871131)
> MySQL Error: 1064 (You have an error in your SQL syntax; check the
> manual that corresponds to your MySQL server version for the right
> syntax to use near ' 0, '', 'P', 1229871131, 1229871131)' at line 1)
> ======
>
> >


--------------------------------------------------------------------------------



No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.176 / Virus Database: 270.9.19/1859 - Release Date: 12/20/2008
2:34 PM

Luc Verhelst

unread,
Dec 21, 2008, 12:24:36 PM12/21/08
to php...@googlegroups.com
There is something wrong with the shipping cost. The database expects a number (either 0 or the actual shipping cost), but the page tries to insert a null/empty value.
Did you change the page ?

Luc

2008/12/21 philomniglot <philom...@gmail.com>

Luc Verhelst

unread,
Dec 21, 2008, 12:27:11 PM12/21/08
to php...@googlegroups.com
(Oops. Didn't read Jeff Newman's reply before posting my own.)

Luc

2008/12/21 Luc Verhelst <luc.ve...@gmail.com>

Jeff Newman

unread,
Dec 21, 2008, 1:24:28 PM12/21/08
to php...@googlegroups.com
actually, that's a good observation - you may have to define the shipping
cost to be 0 (zero) manually in the code if you aren't using it. commenting
out that function call will cause no value there or i think even a call that
doesn't find any shipping costs will return the null value.

if memory serves me correctly there.
Reply all
Reply to author
Forward
0 new messages