rpwilkins Posted June 3, 2009 Posted June 3, 2009 Can anyone help me please? I am setting up an online store using oscommerce and in the admin section on the products attributes section I get the following error message: 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 '-0, MAX_ROW_LISTS_OPTIONS' at line 1 select * from products_options where language_id = '1' order by products_options_id limit -0, MAX_ROW_LISTS_OPTIONS My host server is installed with PHP Version 4.4.9 and mysql 5.0.67 and I can only assume it's an error in the coding/mysql version Does anyone know what I need to change to fix this? Thanks Rob
Guest Posted June 3, 2009 Posted June 3, 2009 Looks like it could be a split page results error. Try this limit -20, 20 http://www.oscommerce.com/community/bugs,1605 Problem: 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 Solution: Line 67 in catalog/includes/classes/split_page_results.php must be changed from: $this->sql_query .= " limit " . $offset . ", " . $this->number_of_rows_per_page; to: $this->sql_query .= " limit " . max($offset, 0) . ", " . $this->number_of_rows_per_page; Line 38 in catalog/admin/includes/classes/split_page_results.php must be changed from: $sql_query .= " limit " . $offset . ", " . $max_rows_per_page; to: $sql_query .= " limit " . max($offset, 0) . ", " . $max_rows_per_page;
rpwilkins Posted June 3, 2009 Author Posted June 3, 2009 Thanks but I checked the code and was already as you said it should be, even tried changing it back but that didn't seem to help There is an additional warning message I omitted not sure if that changes anything? Warning: Division by zero in /catalog/admin/includes/classes/split_page_results.php on line 33 Warning: Division by zero in /catalog/admin/includes/classes/split_page_results.php on line 47 Both lines of code are as follows: $num_pages = ceil($query_num_rows / $max_rows_per_page); $num_pages = ceil($query_numrows / $max_rows_per_page); Thanks again
FIMBLE Posted June 3, 2009 Posted June 3, 2009 This could mean there is no data in the table. Sometimes you're the dog and sometimes the lamp post [/url] My Contributions
rpwilkins Posted June 4, 2009 Author Posted June 4, 2009 This could mean there is no data in the table. No I don't think it's that as I had it all working fine on my local server
♥geoffreywalton Posted June 4, 2009 Posted June 4, 2009 and did you transfer the data to your site? Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile Virus Threat Scanner My Contributions Basic install answers. Click here for Contributions / Add Ons. UK your site. Site Move. Basic design info. For links mentioned in old answers that are no longer here follow this link Useful Threads. If this post was useful, click the Like This button over there ======>>>>>.
rpwilkins Posted June 4, 2009 Author Posted June 4, 2009 and did you transfer the data to your site? I used the same files yes the only differences I could think of may be different versions PHP and MySQL
♥geoffreywalton Posted June 4, 2009 Posted June 4, 2009 MAX_ROW_LISTS_OPTIONS Tends to indicate the configuration table does not contain the entry for MAX_ROW_LISTS_OPTIONS or it has not been read into memory. G PS Memo to self look at the reported problem not the answers given. Led myself astray there. Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile Virus Threat Scanner My Contributions Basic install answers. Click here for Contributions / Add Ons. UK your site. Site Move. Basic design info. For links mentioned in old answers that are no longer here follow this link Useful Threads. If this post was useful, click the Like This button over there ======>>>>>.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.