Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Strange Error


com1usa

Recommended Posts

I have a cart working perfectly, and then I was trying to get rid of the review button ,changed some files and now have this 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 '' at line 1

 

select p.products_id, p.products_image from orders_products opa, orders_products opb, orders o, products p where opa.products_id = '28' and opa.orders_id = opb.orders_id and opb.products_id != '28' and opb.products_id = p.products_id and opb.orders_id = o.orders_id and p.products_status = '1' group by p.products_id order by o.date_purchased desc limit

 

[TEP STOP]

 

The cart still works from beginning to end except for this error that shows up on the product info page only. What could it be???

Link to comment
Share on other sites

Well, since products_id and prodcuts_status are int, and tinyint, respectivly, I would suggest taking the number out of single quotes.

 

This might cause problems onolder versions of MySQL.

 

Other than that, this query runs ferfectly on my DB.

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

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Link to comment
Share on other sites

It could be that your host changed the version of MySQL that you are using.

 

But probably more likily is you've fudge something up when you tried to make alterations. Why don't you try restoring from the backup you made before you made any changes.

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

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Link to comment
Share on other sites

the problem is, the last 10 minutes or so that i was making changes, I was on the phone and somehow made a change that I didnt back up.

If I could narrow down the guilty pages, i would replace them with the default pages. Any idea which page I screwed up?

Link to comment
Share on other sites

I was changing things on the product info page, but I have already replaced that and still the error. I also deleted all the products out of the admin area and entered a few new ones, thats all i did, it was working before......

Link to comment
Share on other sites

Well, my guess would be the page that the error show up on.

 

Just a guess, tho. :wink:

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

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Link to comment
Share on other sites

No, you definatly altered something in the php file that you shouldn't have.

 

You don't have to start ALL over, just download the one file that you need, and replce this one file on your server.

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

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...