osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

Recover missing order info from DB

This is a discussion on Recover missing order info from DB within the New osCommerce Contributions forums, part of the osCommerce 2.2 Forums category; Try this instead of the previous post. I should have used LEFT JOIN instead of JOIN. This way, both orders ...


Go Back   osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > New osCommerce Contributions

Register FAQ Members List Calendar Mark Forums Read


Welcome to osCMax Join osCMax Now! Download osCMax Here
Reply

 

LinkBack Thread Tools
  #1  
Old 10-22-2008, 05:10 PM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 11,482
Thanks: 83
Thanked 356 Times in 334 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
Post Recover missing order info from DB

Try this instead of the previous post. I should have used LEFT JOIN instead of JOIN. This way, both orders with products that have attributes and those that don't have attributes are found.

Some people may need products attributes information. Here is the MySQL code to do that. Substitute the actual customer's id for . This SQL statement will find orders whether there are product attributes or not.

SELECT cb.customers_basket_quantity, pd.products_name, pov.products_options_values_name
FROM customers_basket cb
LEFT JOIN products_description pd ON pd.products_id=cb.products_id
LEFT JOIN customers_basket_attributes cba ON cba.customers_id=cb.customers_id
LEFT JOIN products_options_values pov ON cba.products_options_value_id=pov.products_options _values_id
WHERE cb.customers_id =''
AND pd.language_id = '1'


More...
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates designed for osCMax 2. Loyalty discounts up to 30% off!
    Each purchase supports the osCMax project with much needed funds!

  • 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. Default multi server configuration for exceptional performance!

  • 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!
Reply With Quote
Reply

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
Recover missing order info from DB michael_s New osCommerce Contributions 0 10-22-2008 09:00 AM
Recover missing order info from DB michael_s New osCommerce Contributions 0 10-03-2007 01:12 AM
Customer Info not in order (name, address, etc) irr1449 osCMax v2 Installation issues 2 06-06-2007 04:39 AM
order details missing products caz osCMax v2 Installation issues 15 04-23-2007 12:39 PM
Order Editor missing 'shipping_tax' column in orders table cbp osCMax v2 Installation issues 9 01-02-2007 09:30 AM


All times are GMT -8. The time now is 02:04 PM.


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