mein Wunsch:
ich möchte in der merbers.php Liste noch ausgeben, wenn eine Handynr in einem Profifeld hinterlegt ist. Bin zwar am tüfteln, komme aber mit dem internen Tabellenaufbau nicht weiter.
wie veränder ich das sql Statement so ab, das aus der ffb_user_data bei dem akt. Benutzer das Feld usd_usf_id Datensatz 43 (Handynr_Vorwahl) und Datensatz 44 (Handymr_Nummer) zusammen als Handynr ausgelesen werden können.
Code: Alles auswählen
$sql = "SELECT DISTINCT usr_id, last_name.usd_value as last_name,
first_name.usd_value as first_name,
email.usd_value as email, homepage.usd_value as homepage,
usr_login_name, usr_last_change, 1 member
FROM ". TBL_MEMBERS. ", ". TBL_ROLES. ", ". TBL_CATEGORIES. ", ". TBL_USERS. "
RIGHT JOIN ". TBL_USER_DATA. " as last_name
ON last_name.usd_usr_id = usr_id
AND last_name.usd_usf_id = ". $g_current_user->getProperty("Nachname", "usf_id"). "
LEFT JOIN ". TBL_USER_DATA. " as first_name
ON first_name.usd_usr_id = usr_id
AND first_name.usd_usf_id = ". $g_current_user->getProperty("Vorname", "usf_id"). "
LEFT JOIN ". TBL_USER_DATA. " as email
ON email.usd_usr_id = usr_id
AND email.usd_usf_id = ". $g_current_user->getProperty("E-Mail", "usf_id"). "
LEFT JOIN ". TBL_USER_DATA. " as homepage
ON homepage.usd_usr_id = usr_id
AND homepage.usd_usf_id = ". $g_current_user->getProperty("Homepage", "usf_id"). "
WHERE usr_valid = 1
AND mem_usr_id = usr_id
AND mem_rol_id = rol_id
AND mem_valid = 1
AND rol_valid = 1
AND rol_cat_id = cat_id
AND cat_org_id = ". $g_current_organization->getValue("org_id"). "
$search_condition
ORDER BY last_name.usd_value "
Besten Dank!
PS: Super Script!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
MfG
Sebastian Pech
Code: Alles auswählen