davidandrews Posted January 22, 2005 Posted January 22, 2005 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
Guest Posted January 22, 2005 Posted January 22, 2005 HI ThereJust 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 <{POST_SNAPBACK}> 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";
davidandrews Posted January 22, 2005 Author Posted January 22, 2005 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!
OceanRanch Posted January 22, 2005 Posted January 22, 2005 It looks like you are experiencing the following bug. Not 100% sure though. http://www.oscommerce.com/community/bugs,1605 HTH Tom
Guest Posted January 22, 2005 Posted January 22, 2005 HI ThereGot 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! <{POST_SNAPBACK}> Sounds like a similar problem. What was the fix for the first issue?
davidandrews Posted January 23, 2005 Author Posted January 23, 2005 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 !!
OceanRanch Posted January 23, 2005 Posted January 23, 2005 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 ThereThanks 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 !! <{POST_SNAPBACK}>
davidandrews Posted January 24, 2005 Author Posted January 24, 2005 HI There !!!!!!!! YES!!! This worked and newsletters is working fine I AM VERY GRATEFUL FOR YOUR HELP!!! :D :D :D DA
Recommended Posts
Archived
This topic is now archived and is closed to further replies.