This is a discussion on Problem with MySQL 4 within the osCMax v1.7 Installation forums, part of the osCMax v1.7 Forums category; I had our OSMAX running fine under a server with apache 1.3x and MySQL MySQL-3.23.58-1, we moved it over to ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| I had our OSMAX running fine under a server with apache 1.3x and MySQL MySQL-3.23.58-1, we moved it over to a newer server with Apache 2.x and MySQL-server-4.1.8-0. My Problem is when you go to certain menu options like reports I get this error: Best Customer Orders-Total 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 '-12, 12' 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 -12, 12 [TEP STOP] Most of the other menus, and the front end run just fine.... I used MySQL administrator to backup from the old server, and restore to the new server the DB. Then I did an Oscommerce backup, and a command line restore as specified in the docs, with the same result. Any ideas? Thanks! |
|
#2
| ||||
| ||||
| osC is not compatible with mysql 4.1.x. Downgrade to 4.0.x Otherwise, you will have to track down the problems with the php code and fix them to be compatible with 4.1.x
__________________ Michael Sasek osCMax Developer
|
|
#3
| |||
| |||
| I'm running osC on mysql 4.1.x, and don't experience any problems, after a small bug fix I'm allmost sure the mentioned problem is caused by the split_page_results.php bug wich causes negative limits (like: limit -12, 12) which aren't allowed. see: http://www.oscommerce.com/community/bugs,2300 solution ( both admin and catalog): Code: $offset = ($max_rows_per_page * ($current_page_number - 1)); $sql_query .= " limit " . $offset . ", " . $max_rows_per_page; Code: $offset = ($max_rows_per_page * ($current_page_number - 1)); if ($offset < 0) $offset = 0; $sql_query .= " limit " . $offset . ", " . $max_rows_per_page; |
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Compatible with PHP 4.33 and mysql 3.23 | the_error_king | osCMax v2 Installation issues | 6 | 06-15-2005 07:19 PM |
| MySQL problem | calle | osCommerce 2.2 Modification Help | 3 | 11-23-2004 02:44 PM |
| MySQL? Please help! | extremenewb | osCommerce 2.2 Installation Help | 3 | 09-22-2004 07:31 AM |
| mySQL database | mattias2 | osCommerce 2.2 Installation Help | 1 | 10-23-2003 06:46 PM |