osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

Problem with MySQL 4

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 ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v1.7 Forums > osCMax v1.7 Installation

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 04-14-2005, 03:41 AM
New Member
 
Join Date: Nov 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
SpongeBob
Default Problem with MySQL 4

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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #2  
Old 04-14-2005, 06:21 AM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,328
Thanks: 68
Thanked 322 Times in 305 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default RE: Problem with MySQL 4

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


  • osCMax Templates - Hundreds of premium quality templates. New designs every month!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host.

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 04-14-2005, 11:47 AM
Member
 
Join Date: Jan 2004
Location: Netherlands
Posts: 71
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
paulM
Default Re: RE: Problem with MySQL 4

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;
to

Code:
$offset = ($max_rows_per_page * ($current_page_number - 1));
if ($offset < 0) $offset = 0;
$sql_query .= " limit " . $offset . ", " . $max_rows_per_page;
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -8. The time now is 03:47 AM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax