Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Error in admin when all manufacturers are removed


mpjx

Recommended Posts

Hi,

 

I have a series of errors/problems in the Admin section of osC. I'm running osC under PHP 4.3.6, mySQL 4.1.6 and Mac osX.

 

I just deleted all the Manufacturers that are installed by default (ie the test info) and the following error message was immediately displayed in the centre of the manufacturers.php page:

 

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

 

select manufacturers_id, manufacturers_name, manufacturers_image, date_added, last_modified from manufacturers order by manufacturers_name limit -20, 20

 

I have exactly the same error with the following pages:

 

reviews.php

specials.php

products_expected.php

orders.php

stats_products_viewed.php

stats_products_purchased.php

stats_customers.php

 

In every case there are no records existing in the database.

 

I'm not sure if this problem is caused by my mySQL configuration (it runs in safe mode), my PHP configuration or if I need to update the PHP syntax in my pages.

 

Any help greatly appreciated as this is my first osC install and I'm a relative newbie with PHP.

 

Thanks

Martin Jewiss

Link to comment
Share on other sites

I'm having the exact same problem in Admin, I removed all the manufacturers and was planning on adding the ones for my client and now I get :

 

Manufacturers

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

 

select manufacturers_id, manufacturers_name, manufacturers_image, date_added, last_modified from manufacturers order by manufacturers_name limit -20, 20

 

[TEP STOP]

 

Everytime I go back into the manufacturers section. Any ideas on where to start to fix this sucker.

 

Thanks,

 

Dave

Link to comment
Share on other sites

Okay, just fixed the problem, I've found it helps to have a copy of the database unmodified in another directory under mysql. Copied all the unmodified manufacturers files in the directory to the active directory, then you have to shutdown your MySQL server and restart it, everything reloads and you can get back into the manufacturers area.

 

Hope this helps,

 

Dave

Link to comment
Share on other sites

Hi Dave,

 

I found a similar solution yesterday. I accessed the osC database using myPHPAdmin, found the manufacturers table and manually added a record. Everything came back.

 

Cheers

 

Martin

Martin Jewiss

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...