Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Admin control panel errors


davidandrews

Recommended Posts

Posted

HI There

Just had to reinstall my site from a back up and having some problems

 

In my ADMIN PANEL the only things which are not working are

reports> customer orders

 

and i get this:

 

Best Customer Orders-Total No. Customers Total Purchased

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 c.customers_firstname, c.customers_lastname, sum(op.products_quantity * op.final_price) as ordersum from customers c, orders_products op, orders o where c.customers_id = o.customers_id and o.orders_id = op.orders_id group by c.customers_firstname, c.customers_lastname order by ordersum DESC limit -20, 20

 

[TEP STOP]

 

What is the problem and how do I solve it??

 

Is this a PERMISSIONS problem?

 

Massive appreciation for any help!

 

Thanks

Posted
HI There

Just had to reinstall my site from a back up and having some problems

 

In my ADMIN PANEL the only things which are not working are

reports> customer orders

 

and i get this:

 

Best Customer Orders-Total  No. Customers Total Purchased 

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 c.customers_firstname, c.customers_lastname, sum(op.products_quantity * op.final_price) as ordersum from customers c, orders_products op, orders o where c.customers_id = o.customers_id and o.orders_id = op.orders_id group by c.customers_firstname, c.customers_lastname order by ordersum DESC limit -20, 20

 

[TEP STOP] 

 

What is the problem and how do I solve it??

 

Is this a PERMISSIONS problem?

 

Massive appreciation for any help!

 

Thanks

In admin/stats_customers.php, if you have this:

 

$customers_query_raw = "select c.customers_firstname, c.customers_lastname, sum(op.products_quantity * op.final_price) as ordersum from customers c, orders_products op, orders o where c.customers_id = o.customers_id and o.orders_id = op.orders_id group by c.customers_firstname, c.customers_lastname order by ordersum DESC limit -20, 20";

 

backup the file and then try changing it to this:

 

$customers_query_raw = "select c.customers_firstname, c.customers_lastname, sum(op.products_quantity * op.final_price) as ordersum from " . TABLE_CUSTOMERS . " c, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_ORDERS . " o where c.customers_id = o.customers_id and o.orders_id = op.orders_id group by c.customers_firstname, c.customers_lastname order by ordersum DESC";

Posted

HI There

Got this working , but the NEWSLETTERS function in the admin panel kicks out this error message:

 

Newsletter Manager

 

Newsletters Size Module Sent Status Action

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 newsletters_id, title, length(content) as content_length, module, date_added, date_sent, status, locked from newsletters order by date_added desc limit -20, 20

 

[TEP STOP]

 

 

 

Any ideas on what I need to do to be able to access it?

 

Thanks!

Posted
HI There

Got this working , but the NEWSLETTERS function in the admin panel kicks out this error message:

 

Newsletter Manager 

 

Newsletters Size Module Sent Status Action 

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 newsletters_id, title, length(content) as content_length, module, date_added, date_sent, status, locked from newsletters order by date_added desc limit -20, 20

 

[TEP STOP] 

 

Any ideas on what I need to do to be able to access it?

 

Thanks!

 

Sounds like a similar problem. What was the fix for the first issue?

Posted

HI There

Thanks for that!

Which files do I need to alter, and I will get my hands dirty re-coding it

 

People mention some files on that page, but don't mention what they changed them to

 

BEST WISHES !!

Posted

Read the bug report comments for the various work arounds that some folks have successfully coded. The file names they used are right there.

 

http://www.oscommerce.com/community/bugs,1605

 

HTH

 

Tom

HI There

Thanks for that!

Which files do I need to alter, and I will get my hands dirty re-coding it

 

People mention some files on that page, but don't mention what they changed them to

 

BEST WISHES !!

Archived

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

×
×
  • Create New...