Kundenübernahme xtc

tewert1

Aktives Mitglied
6. Mai 2014
60
0
Hallo,

ich habe den SQL Befehl aus dem WIKI von JTL. Leder fehlt mir hier eine Filterung für die Sprache.
In der derzeitigen Ausführung bekomme ich alles doppelt wie es scheint.
Code:
SELECT DISTINCT 
customers_status.customers_status_name,
customers.customers_password AS cPasswort, 
customers.customers_gender AS cAnrede,
address_book.entry_firstname AS cVorname,
address_book.entry_lastname AS cNachname,
address_book.entry_company AS cFirma,
address_book.entry_street_address AS cStrasse,
address_book.entry_suburb AS cAdressZusatz,
address_book.entry_postcode AS cPLZ,
address_book.entry_city AS cOrt,
address_book.entry_state AS cBundesland,
countries.countries_iso_code_2 AS cLand,
customers.customers_telephone AS cTel,
customers.customers_fax AS cFax,
customers.customers_email_address AS cMail,
customers.customers_vat_id AS cUSTID,
customers.customers_dob AS dGeburtstag,
customers.customers_date_added AS dErstellt
FROM address_book
JOIN customers ON customers.customers_default_address_id = address_book.address_book_id
JOIN countries ON countries.countries_id = address_book.entry_country_id
JOIN customers_status ON customers_status.customers_status_id = customers.customers_status
ORDER BY customers.customers_status, customers.customers_date_added

Kann mir jemand einen Filter Option sagen wie ich herausfiltere das die Sprache nur DETUSCH sein darf?
Was passiert bei doppelt belegten Emails?
 

Morningstar76

Aktives Mitglied
1. September 2010
11
0
AW: Kundenübernahme xtc

Hallo,

das liegt an der Tabelle customers_status. Die enthält jeden Kundenstatus ("Neuer Kunde","Händler" ...) in jeder hinterlegten Sprache. Mit den Statement:


die languages_id für Deutsch (Standard=2) herausfinden und vor das "ORDER BY" in deinem SELECT ein


einfügen.

Grüße
Jens