Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

What do these database errors mean?


cdi-buy.com

Recommended Posts

Posted

This never happened before, but suddenly it's showing up all the time.

 

This is what I get when trying to view the reviews page when there are no reviews. If I write up a review and access the page, it works fine. I delete the review and I get this error again.

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 '-15, 15' at line 1

select reviews_id, products_id, date_added, last_modified, reviews_rating from reviews order by date_added DESC limit -15, 15

[TEP STOP]

 

 

 

This is what I get when I try to view orders by customer...ie highlight a customer name, and click the orders button to see what all they ordered. Again, if the customer has orders then it works fine. If the customer has made no orders, I get the 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 '-50, 50' at line 1

select o.orders_id, o.customers_name, o.customers_id, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, o.fedex_tracking, ot.text as order_total from orders o left join orders_total ot on (o.orders_id = ot.orders_id), orders_status s where o.customers_id = '213' and o.orders_status = s.orders_status_id and s.language_id = '1' and ot.class = 'ot_total' order by orders_id DESC limit -50, 50

[TEP STOP]

 

 

 

It only happens when there are no results to display in the admin. The specific error obviously varies depending on the page I'm trying to view but they're all essentially the same. The lines they refer to have never been modified. Is there something else I should look for so it has to be a problem with the database itself...but what could it be?

 

It's not something I'm incredibly concerned with because all it's doing is giving me that error rather than the message saying "There are no ____" It's just wierd.

Posted
This never happened before, but suddenly it's showing up all the time.

I'm no expert on this (no such thing as an expert!), but from what I've seen before, this sounds like either you have updated from PHP4 to PHP5 or you are using MySQL as your database and that has been updated.

 

If you are on a shared host then talk to your supplier and ask.

 

Older versions of OSC have problems with PHP5 and new versions of MySQL. If this is the problem then the latest OSC (dated 13th Nov 2005) addresses these problems. The new version also includes instructions for patching an existing (old) version of OSC so you don't need to install again from scratch.

 

Rich.

Posted

Thanks for the quick response Rich. I'm still on MS2 of OSC since I didn't know they came out with a new release in November. I'm also still on MySQL v 4.1.14-standard and PHP 4.4.2 (Zend: 1.3.0).

 

Honestly not sure if my host is dedicated or shared. I never talked to the guy about how it's set up. I'm not aware of him hosting any others but it's possible. I'll have to assume shared.

 

I did put in a support ticket with him just after posting here, so I'll see what he says.

 

Thanks again!

Posted
Awesome! Thanks Bear!

Yes, this is one of the things addressed in the 13/11/05 release.

 

Rich.

Posted

I can understand that but I spent so much time getting my site up to where I want it, I'm not willing to upgrade if it's not severely broken. :)

 

I'm burnt out from code and just want to sell at this point. ;)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...