Managed Server
Neuigkeiten
  • Die modified eCommerce Shopsoftware ist kostenlos, aber nicht umsonst.
    Spenden
  • Damit wir die modified eCommerce Shopsoftware auch zukünftig kostenlos anbieten können:
    Spenden
  • Thema: SQL Commands für Usercreate

    HandsUpFreak

    • Neu im Forum
    • Beiträge: 20
    SQL Commands für Usercreate
    am: 02. Januar 2011, 19:36:38
    Hallo und guten Abend,
    ich steige leider durch die Prefix vom XTC nicht so ganz durch und benötige die SQL-Befehle die bei dem Useraccount-create ausgeführt werden.
    Ich nutze zum anlegen die arrays $row['userID'], $row['username'], firstname etc.
    Wäre sehr nett wenn mir das jemand anpassen könnte, weil ich wie gesagt nicht durchsteige.

    Mfg



    Linkback: https://www.modified-shop.org/forum/index.php?topic=10373.0
    Shop Hosting

    franky_n

    • Experte
    • Beiträge: 4.950
    SQL Commands für Usercreate
    Antwort #1 am: 02. Januar 2011, 19:46:27
    Hallo HandsUpFreak,

    diese Zeilen (ich habs mal zusammen gerafft) aus der account_create.php sollten Dir eigentlich alle Felder und Tabellen zum Erstellen deutlich machen:

    Code: PHP  [Auswählen]
                    $sql_data_array = array (
                    'customers_vat_id' => $vat,
                    'customers_vat_id_status' => $customers_vat_id_status,
                    'customers_status' => $customers_status,
                    'customers_firstname' => $firstname,
                    'customers_lastname' => $lastname,
                    'customers_email_address' => $email_address,
                    'customers_telephone' => $telephone,
                    'customers_fax' => $fax,
                    'customers_newsletter' => $newsletter,
                    'customers_password' => xtc_encrypt_password($password),
                    'customers_date_added' => 'now()',
                    'customers_last_modified' => 'now()',
                    );
                    xtc_db_perform(TABLE_CUSTOMERS, $sql_data_array);

                    $sql_data_array = array ('customers_id' => $_SESSION['customer_id'], 'entry_firstname' => $firstname, 'entry_lastname' => $lastname, 'entry_street_address' => $street_address, 'entry_postcode' => $postcode, 'entry_city' => $city, 'entry_country_id' => $country,'address_date_added' => 'now()','address_last_modified' => 'now()');
                    xtc_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array);

                    xtc_db_query("update ".TABLE_CUSTOMERS." set customers_default_address_id = '".$address_id."' where customers_id = '".(int) $_SESSION['customer_id']."'");

                    xtc_db_query("insert into ".TABLE_CUSTOMERS_INFO." (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('".(int) $_SESSION['customer_id']."', '0', now())");
     
    Viele Grüße

    Franky