Results 1 to 8 of 8
  1. #1
    Join Date
    Aug 2010
    Posts
    76
    Plugin Contributions
    0

    Default SQL Query for extracting Order & Customer Details?

    I am trying to build a simple web-page to fetch & display "Order & Customer Details" on a web-page and finally save that info into an "Excel Sheet". There are many "add-ons" available to do this, but I didn't found any "add-on" that also include "Customer-Fax".

    I have found a SQL query. Can anyone plz suggest how should I modify this to include "Customer-Fax" details ...!

    -----------------------------------

    SELECT
    zo.orders_id as v_orders_id,
    customers_id as v_customers_id,
    customers_name as v_customers_name,
    customers_company as v_customers_company,
    customers_street_address as v_customers_street_address,
    customers_suburb as v_customers_suburb,
    customers_city as v_customers_city,
    customers_postcode as v_customers_postcode,
    customers_country as v_customers_country,
    customers_telephone as v_customers_telephone,
    customers_email_address as v_customers_email_address,
    date_purchased as v_date_purchased,
    comments as v_comments,
    products_name as v_products_name,
    products_quantity as v_quantity,
    products_options as v_products_options,
    products_options_values as v_products_options_values


    FROM zen_orders_products zop LEFT JOIN zen_orders_products_attributes opa
    ON(zop.orders_products_id = opa.orders_products_id), zen_orders zo, zen_orders_status_history zosh
    WHERE zo.orders_id = zop.orders_id
    AND zo.orders_id = zosh.orders_status_history_id;


    -------------------------------------

    Many thanks in advance.
    Last edited by Rony; 22 Sep 2010 at 04:30 AM.

  2. #2
    Join Date
    Aug 2010
    Posts
    76
    Plugin Contributions
    0

    Default Re: SQL Query for extracting Order & Customer Details?

    Any SQL Expert, Plz help...!

  3. #3
    Join Date
    Oct 2004
    Location
    Ontario
    Posts
    116
    Plugin Contributions
    1

    Default Re: SQL Query for extracting Order & Customer Details?

    customers_country as v_customers_country,
    customers_telephone as v_customers_telephone,
    customers_fax as v_customers_fax,
    customers_email_address as v_customers_email_address,

  4. #4
    Join Date
    Aug 2010
    Posts
    76
    Plugin Contributions
    0

    Default Re: SQL Query for extracting Order & Customer Details?

    Quote Originally Posted by Flipside View Post
    customers_country as v_customers_country,
    customers_telephone as v_customers_telephone,
    customers_fax as v_customers_fax,
    customers_email_address as v_customers_email_address,
    Nice, But its not that easy .....

    This is the ERROR you receive if you try to run the query...

    "[Err] 1054 - Unknown column 'customers_fax' in 'field list'"

    You got to reference/call/join the table "customers" somewhere in the FROM clause ......

  5. #5
    Join Date
    Jan 2010
    Posts
    189
    Plugin Contributions
    1

    Default Re: SQL Query for extracting Order & Customer Details?

    Quote Originally Posted by Rony View Post
    I am trying to build a simple web-page to fetch & display "Order & Customer Details" on a web-page and finally save that info into an "Excel Sheet". There are many "add-ons" available to do this, but I didn't found any "add-on" that also include "Customer-Fax".
    You might try Apsona ShopAdmin. It includes features for the kinds of reporting you indicate here.

    Apsona

  6. #6
    Join Date
    Aug 2010
    Posts
    76
    Plugin Contributions
    0

    Default Re: SQL Query for extracting Order & Customer Details?

    Quote Originally Posted by apsona View Post
    You might try Apsona ShopAdmin. It includes features for the kinds of reporting you indicate here.

    Apsona
    I tried "apsona", but it shows incorrect "Order Totals" for Hybrid orders.

  7. #7
    Join Date
    Aug 2010
    Posts
    76
    Plugin Contributions
    0

    Default Re: SQL Query for extracting Order & Customer Details?

    Darn.... 111 Views and still no answer ....

    I didn't knew it was so tough.

    All I wanted is to include "Customer-Fax" in my query result ....

  8. #8
    Join Date
    Jan 2010
    Posts
    189
    Plugin Contributions
    1

    Default Re: SQL Query for extracting Order & Customer Details?

    Quote Originally Posted by Rony View Post
    I tried "apsona", but it shows incorrect "Order Totals" for Hybrid orders.
    Could you please send a screen shot with the incorrect "Order Total". Curious to see why it is happening.

    apsona

 

 

Similar Threads

  1. v154 Help with a SQL Query for Query Builder
    By lindasdd in forum Managing Customers and Orders
    Replies: 2
    Last Post: 24 Mar 2016, 01:18 PM
  2. Bulk change to order status using SQL query for certain products?
    By neo2810 in forum Managing Customers and Orders
    Replies: 3
    Last Post: 24 Feb 2012, 08:34 PM
  3. New page with custom form & sql query
    By nialler in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 13 Nov 2009, 02:14 PM
  4. mysql query for order details?
    By billt in forum General Questions
    Replies: 0
    Last Post: 12 Oct 2009, 09:28 PM
  5. SQL query logs for the checkout->order creation process
    By capybara74 in forum General Questions
    Replies: 0
    Last Post: 22 Jun 2009, 03:12 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR