bruno_caramiel Posted September 2, 2005 Share Posted September 2, 2005 First I'd like to say that other topics I found about this problem didn't help me. Problem, on /admin/orders.php : 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 'select o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last' at line 1 select count(select o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from orders o left join orders_total ot on (o.orders_id = ot.orders_id), orders_status s where o.orders_status = s.orders_status_id and s.language_id = \'1\' and s.orders_status_id = \'1\' and ot.class = \'ot_total\' order by o.orders_id DESC) as total Notice that this bug is different from that one : http://www.oscommerce.com/forums/index.php?showtopic=144095&st=0 Any idea ? Quote Link to comment Share on other sites More sharing options...
bruno_caramiel Posted September 2, 2005 Author Share Posted September 2, 2005 (edited) More informations... The problem seems to be that in /admin/orders.php, we got this : $orders_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $orders_query_raw, $orders_query_numrows); and $HTTP_GET_VARS['page'] is empty.... So, in /admin/includes/classes/split_page_results.php, we got this : function splitPageResults($query, $max_rows, $count_key = '*', $page_holder = 'page') { global $HTTP_GET_VARS, $HTTP_POST_VARS; $this->sql_query = $query; But $query is empty !! That's why the next mysql query doesn't work. Temporary solution if you really need your admin to work, such as me : Search : $count_query = tep_db_query("select count(" . $count_string . ") as total " . substr($this->sql_query, $pos_from, ($pos_to - $pos_from))); $count = tep_db_fetch_array($count_query); $this->number_of_rows = $count['total']; Replace by : // $count_query = tep_db_query("select count(" . $count_string . ") as total " . substr($this->sql_query, $pos_from, ($pos_to - $pos_from))); // $count = tep_db_fetch_array($count_query); // $this->number_of_rows = $count['total']; Here it is... ( but help :'( ) Edited September 2, 2005 by bruno_caramiel Quote Link to comment Share on other sites More sharing options...
bruno_caramiel Posted September 4, 2005 Author Share Posted September 4, 2005 Up ! Any solution for this pb ? Quote Link to comment Share on other sites More sharing options...
axia1g Posted April 24, 2007 Share Posted April 24, 2007 I have same problem. Anyone have solution? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.