Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

query problem


morbidxangel

Recommended Posts

first of all, thanks to deep-silver for this very useful module.

 

i am doing some modification that added one extra column in customers_points_pending table which i named customers_refid. the data are added successfully according to the checkout_process.php. unique_id successfully adds row twice and under orders_id column generates 2 rows also, one for the original order id and one constant id which is number "1". however we all know that on customers_points_pending.php page the queries that will show on the said page are with the cpp.orders_id = o.orders_id and o.orders_id = ot.orders_id. i would like to ask how can i add the ones in the orders_id column with the value of 1. kindly look at my code.

 

$orders_query_raw = "select o.orders_id, o.orders_status, o.customers_name, o.customers_email_address, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total, cpp.points_pending as points_pending, cpp.comment as comment, cpp.status as status, cpp.orders_id as orders_id from " . TABLE_ORDERS . " o , " . TABLE_ORDERS_TOTAL . " ot , " . TABLE_ORDERS_STATUS . " s , customers_points_pending cpp where ot.class = 'ot_total' " . $filter_selection . "and cpp.orders_id = o.orders_id and cpp.orders_id = '1' and o.orders_id = ot.orders_id and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' order by $sort";

 

the above code prints nothing.

 

i hope i explained my question well and thank you for any suggestion you can direct me.

Link to comment
Share on other sites

first of all, thanks to deep-silver for this very useful module.

 

i am doing some modification that added one extra column in customers_points_pending table which i named customers_refid. the data are added successfully according to the checkout_process.php. unique_id successfully adds row twice and under orders_id column generates 2 rows also, one for the original order id and one constant id which is number "1". however we all know that on customers_points_pending.php page the queries that will show on the said page are with the cpp.orders_id = o.orders_id and o.orders_id = ot.orders_id. i would like to ask how can i add the ones in the orders_id column with the value of 1. kindly look at my code.

 

$orders_query_raw = "select o.orders_id, o.orders_status, o.customers_name, o.customers_email_address, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total, cpp.points_pending as points_pending, cpp.comment as comment, cpp.status as status, cpp.orders_id as orders_id from " . TABLE_ORDERS . " o , " . TABLE_ORDERS_TOTAL . " ot , " . TABLE_ORDERS_STATUS . " s , customers_points_pending cpp where ot.class = 'ot_total' " . $filter_selection . "and cpp.orders_id = o.orders_id and cpp.orders_id = '1' and o.orders_id = ot.orders_id and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' order by $sort";

 

the above code prints nothing.

 

i hope i explained my question well and thank you for any suggestion you can direct me.

 

wrong post. sorry.

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.
Note: Your post will require moderator approval before it will be visible.

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