Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

SQL Syntax Error in checkout_payment.php


Amadeuss

Recommended Posts

Hello community. I installed not long ago a module for oscommerce that is supposed to guarantee that COD payments are received.

Unfortunately the creator of this module is unable to help ( I wonder why ) and I receive a SQL syntax error everytime I try to checkout in checkout_payment.php

 

I thought someone here could have an ideea about what is wrong.

 

 

The error I receive is:

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 '))' at line 1

 

select sum(value) as open_orders from orders_total where class = 'ot_total' and orders_id in (select orders_id from orders where customers_id = '159' and orders_status in ())

 

[TEP STOP]

 

 

Now... I see that checkout_payment.php triggers includes/classes/order.php

So ... I looked and looked and found this code....

 

 

$order_total_query = tep_db_query("select text from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int)$order_id . "' and class = 'ot_total'");
		$order_total = tep_db_fetch_array($order_total_query);

  $shipping_method_query = tep_db_query("select title from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int)$order_id . "' and class = 'ot_shipping'");
  $shipping_method = tep_db_fetch_array($shipping_method_query);

  $order_status_query = tep_db_query("select orders_status_name from " . TABLE_ORDERS_STATUS . " where orders_status_id = '" . $order['orders_status'] . "' and language_id = '" . (int)$languages_id . "'");
  $order_status = tep_db_fetch_array($order_status_query);

 

 

 

that I think ... I THINK ( so it's not 100% sure ) might be at fault here....

Any help would be appreciated.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...