Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4255
Latest: andreios
New This Month: 3
New This Week: 1
New Today: 0
Stats
Total Posts: 43259
Total Topics: 7518
Most Online Today: 201
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 181
Total: 181

Author Topic: Database cart limit querie error  (Read 8694 times)

0 Members and 1 Guest are viewing this topic.

Offline CWVRV

  • Full Member
  • ***
  • Posts: 102
    • View Profile
    • Classic Winnebagos & Vintage RVs!
Database cart limit querie error
« on: August 16, 2009, 09:16:32 pm »
smf v2.0 RC1.2

I added an item which only allows a quantity of 1 to be purchased and started getting this error repeatedly:

Type of error: Database  
http://www.classicwinnebagos.com/forum/index.php?http://www.classicwinnebagos.com/forum/storeipn2.php  
Database Error: 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 'LIMIT 1' at line 4
File: public_html/forum/storeipn2.php
Line: 237  

Code: [Select]
StoreDebugLog('Begin query:' . "SELECT
ID_ITEM, ID_CART, ID_MEMBER, date, quantity
FROM {db_prefix}store_CART
WHERE ID_CART = $id_cart LIMIT 1");

$cartResult = $smcFunc['db_query']('', "
SELECT
ID_ITEM, ID_CART, ID_MEMBER, date, quantity
FROM {db_prefix}store_cart
WHERE ID_CART = $id_cart LIMIT 1");
$cartRow = $smcFunc['db_fetch_assoc']($cartResult);
$smcFunc['db_free_result']($cartResult);


Line 273 =  WHERE ID_CART = $id_cart LIMIT 1");


Database queries are waaaaaaay out of my knowledge base... Thanks!




« Last Edit: August 23, 2009, 07:07:40 pm by ~ Phåråoh ~ »

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Database cart limit querie error
« Reply #1 on: August 16, 2009, 10:21:35 pm »
Do you have the shopping cart enabled on your store? Or selling single items only?
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline CWVRV

  • Full Member
  • ***
  • Posts: 102
    • View Profile
    • Classic Winnebagos & Vintage RVs!
Re: Database cart limit querie error
« Reply #2 on: August 16, 2009, 10:57:57 pm »
Shopping cart was always enabled.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Database cart limit querie error
« Reply #3 on: August 17, 2009, 08:32:48 pm »
That item does appear in the shopping cart and you click on add to a cart to checkout correct?


I did a test product with a price of $10 and nothing else changed
"Can have Quantity " is not checked

Is this the exact same settings you have on your item?
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline CWVRV

  • Full Member
  • ***
  • Posts: 102
    • View Profile
    • Classic Winnebagos & Vintage RVs!
Re: Database cart limit querie error
« Reply #4 on: August 18, 2009, 09:44:19 am »
All above conditions are the same.  Other than actual products for sale with on-hand quantities, I have 1 item which is a are download and one which is a subscription.  

I tested both of those items.  All are added to the shopping cart and I know the purchase process works because two subscriptions have been purchased and 2 downloads as well.  The error does not occur during this process.  I cleared the lerror og, went through the point of adding to shopping cart and it generated no errors.

Can have qty is not checked on these items. 

There is one item which has a "low quatity" stock of 1.  I disabled the low stock quantitiy notification, temporarily, just to stop the errors from piling up in my error log, until the syntax of the database querie is reviewed, since that's what the error is explicity indicating as the cause.
« Last Edit: August 18, 2009, 06:02:58 pm by ~ Phåråoh ~ »

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Database cart limit querie error
« Reply #5 on: August 18, 2009, 06:45:56 pm »
The only time you would see errors from
http://www.classicwinnebagos.com/forum/storeipn2.php
Is if a purchase was made.

If you click on that link it may result in errors being generated because no cart id is passed. If the orders are working correctly it would be safe to ignore for now I can later add some code to check for empty card id and not do anything.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline CWVRV

  • Full Member
  • ***
  • Posts: 102
    • View Profile
    • Classic Winnebagos & Vintage RVs!
Re: Database cart limit querie error
« Reply #6 on: August 18, 2009, 09:31:22 pm »
I've been checking the purchases, and no new ones have been made.  Certainly not enough to generate a dozen errors a day.  I'm also wondering if the people trying to, can't for some reason.

This evening, I got 4 store email notifications:

INVALID
 cmd=_notify-validate

It's almost like the thing is deteriorating or something.  I think I'm going to uninstall and re-install the store program.


UPDATE:  Well, that was a bad idea.  Went to uninstall in reverse order of 1.3.4 and got a TON of uninstall errors.  I noticed that the 1.3.3 line in the package manager had [upgrade] next to it.  So, I did that.  Then I saw [upgrade] next to 1.3.4.  The last purchase through the store was on Aug 16th, at which time, all the initial errors were already ocurring.  At least I knew it wasn't preventing sales.  However, this new Email really concerns me.

I did a "real life" purchase and it all went through fine.  So, at least I know that works.  Nonetheless, this is a total nuisance and needs to be dealt with. 

I appreciate your continuing support.  I understand you have a lot of support issues to resolve in order to restore the functionality to other client's accounts.  I will be patient.  I just ask that you not forget about it.

Thanks again.
 
« Last Edit: August 18, 2009, 10:03:27 pm by ~ Phåråoh ~ »

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Database cart limit querie error
« Reply #7 on: August 19, 2009, 08:50:06 pm »
Will check it out this weekend for a fix. Should be simple to change just adding an extra validation check I believe for th cart passed.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Database cart limit querie error
« Reply #8 on: August 22, 2009, 07:21:26 pm »
Fixed for 1.3.5
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline CWVRV

  • Full Member
  • ***
  • Posts: 102
    • View Profile
    • Classic Winnebagos & Vintage RVs!
Re: Database cart limit querie error
« Reply #9 on: August 23, 2009, 07:10:55 pm »
Tested and verified.  Thanks!

 

Related Topics

  Subject / Started by Replies Last post
4 Replies
11568 Views
Last post February 09, 2008, 11:44:03 pm
by ApplianceJunk
9 Replies
9780 Views
Last post September 26, 2008, 09:34:57 pm
by SMFHacks
10 Replies
10480 Views
Last post February 24, 2009, 08:08:08 pm
by Beltazar
3 Replies
6488 Views
Last post February 25, 2009, 11:52:00 pm
by Sweetwater
Database Error

Started by pioneer « 1 2 » Support

22 Replies
13024 Views
Last post April 18, 2009, 11:58:55 am
by SMFHacks

+- Recent Topics

No thumbnails on new uploads by SMFHacks
March 27, 2024, 02:10:41 pm

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

an idea for new mod (( content type with different display )) by SMFHacks
February 27, 2024, 01:36:27 pm

[Mod] RSS Feed Poster by SMFHacks
February 27, 2024, 11:57:18 am

find duplicate pictures by fvlog19
February 14, 2024, 02:22:40 pm

Error uploading video. by SMFHacks
February 08, 2024, 02:04:16 pm

Gallery icon as last added image by fvlog19
February 01, 2024, 01:04:56 pm

Powered by EzPortal