Page 1 of 3 123 LastLast
Results 1 to 10 of 23
  1. #1
    Join Date
    Feb 2012
    Posts
    77
    Plugin Contributions
    0

    Default Combining Multiple Database Customer Tables

    I need the customer's email address, order date/time, name, product ordered, and address to be in a single table. Is there a way to combine multiple items into a new table that can be added to the database?

    zen_address_book lists name and address
    zen_customers_info lists customers_info_date_account_created
    zen_customers lists email address
    zen_customers_basket lists product id
    zen_products_description lists product id and name of product

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Combining Multiple Database Customer Tables

    What business objective are you attempting to solve??

    Where would this information need to be accessible from?
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Combining Multiple Database Customer Tables

    If you are trying to EXTRACT that data, then there is no need to create new tables / fields... Just write a script that gathers it all up and produces it in the output you desire.
    20 years a Zencart User

  4. #4
    Join Date
    Feb 2012
    Posts
    77
    Plugin Contributions
    0

    Default Re: Combining Multiple Database Customer Tables

    Thank you for the quick replies! I am connecting the ZenCart database to Moodle external database authentication and enrollment. Moodle will only allow me to connect to 1 table. My customers do not create an account in ZenCart. I want to use their email address as a login user name and their zip code as a password. These are in 2 different tables.
    Next I want that same table to list the correct course ordered. This is in a 3rd table. I also want the statutory required minimum time to start when they order.

  5. #5
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Combining Multiple Database Customer Tables

    .Moodle will only allow me to connect to 1 table
    Maybe you should be asking there about connecting to more than one table
    Zen-Venom Get Bitten

  6. #6
    Join Date
    Feb 2012
    Posts
    77
    Plugin Contributions
    0

    Default Re: Combining Multiple Database Customer Tables

    I did. Without customization, everything needs to be in 1 table.

  7. #7
    Join Date
    Feb 2012
    Posts
    77
    Plugin Contributions
    0

    Default Re: Combining Multiple Database Customer Tables

    It seems like everything is always interconnected. If I create a new table in phpMyAdmin and add 6 or so columns...pulling info from other tables, will I bring down the whole system? Or will it have no effect?

  8. #8
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Combining Multiple Database Customer Tables

    If I create a new table in phpMyAdmin and add 6 or so columns...pulling info from other tables, will I bring down the whole system?
    You can do this
    Or will it have no effect
    Without code to populate these records in the new table I suspect there will be no effect
    Zen-Venom Get Bitten

  9. #9
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Combining Multiple Database Customer Tables

    You could write a script to copy the required info from the original tables to your new moodle table; but every time there is a new order (or a customer updates some information) your table will be out of date. You need some sort of auto-updating written into every function that affects the relevant fields, which is a significant amount of custom coding. Depending on how your moodle table gets used, it might be feasible to run the updating script every time that table is accessed. No matter what, you will need custom coding written by somebody. Will it be more cost-effective and efficient in the long run to code for this continual updating, or to get code to use the existing tables?

  10. #10
    Join Date
    Feb 2012
    Posts
    77
    Plugin Contributions
    0

    Default Re: Combining Multiple Database Customer Tables

    Thank you! I didn't realize that zen_orders was a more comprehensive table in the database, that included most of what I wanted. As black belt suggested....that would be the table to use and maybe add to.

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. v151 Combining Login Database
    By bottyz in forum General Questions
    Replies: 1
    Last Post: 7 Jan 2016, 03:07 PM
  2. Combining Product from Multiple Sites
    By bergernovelties in forum General Questions
    Replies: 1
    Last Post: 13 Nov 2013, 07:40 AM
  3. Create Database, Tables and Drop Database or Tables
    By elwood cordery in forum General Questions
    Replies: 3
    Last Post: 17 Aug 2009, 04:03 PM
  4. Advanced Search In Multiple database tables
    By Doddsey_65 in forum General Questions
    Replies: 1
    Last Post: 21 May 2009, 07:37 AM
  5. Multiple tax rates per state, combining
    By saiori in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 2
    Last Post: 9 Mar 2009, 03:20 PM

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