EnzoNew Posted October 15, 2016 Share Posted October 15, 2016 Salve e buongiorno premetto che sono alle prime armi e prima di fare errori vorrei chiedere quale comando devo aggiungere a questa query per esportare anche il numero di telefono del cliente e l'email. perchè poi quando seleziono solo un indirizzo cliente cmq mi esporta tutti? grazie SELECT a.`id_address`, a.`firstname` AS `firstname`, a.`lastname` AS `lastname`, `address1`, `postcode`, `city`, cl.`id_country` AS `country` , cl.`name` as country FROM `ww_ps_address` a LEFT JOIN `ww_ps_country_lang` cl ON (cl.`id_country` = a.`id_country` AND cl.`id_lang` = 1) LEFT JOIN `ww_ps_customer` c ON a.id_customer = c.id_customer WHERE 1 AND a.id_customer != 0 AND c.id_shop IN (1) AND a.`deleted` = 0 ORDER BY a.`id_address` ASC Link to comment Share on other sites More sharing options...
Tanzo.it Posted October 17, 2016 Share Posted October 17, 2016 Salve e buongiorno premetto che sono alle prime armi e prima di fare errori vorrei chiedere quale comando devo aggiungere a questa query per esportare anche il numero di telefono del cliente e l'email. perchè poi quando seleziono solo un indirizzo cliente cmq mi esporta tutti? grazie SELECT a.`id_address`, a.`firstname` AS `firstname`, a.`lastname` AS `lastname`, `address1`, `postcode`, `city`, cl.`id_country` AS `country` , cl.`name` as country FROM `ww_ps_address` a LEFT JOIN `ww_ps_country_lang` cl ON (cl.`id_country` = a.`id_country` AND cl.`id_lang` = 1) LEFT JOIN `ww_ps_customer` c ON a.id_customer = c.id_customer WHERE 1 AND a.id_customer != 0 AND c.id_shop IN (1) AND a.`deleted` = 0 ORDER BY a.`id_address` ASC Rispondiamo esattamente alla tua richiesta Basta aggiungere `phone` oppure `phone_mobile` alla query: SELECT a.`id_address`, a.`firstname` AS `firstname`, a.`lastname` AS `lastname`, `address1`, `phone`, `phone_mobile`, `postcode`, `city`, cl.`id_country` AS `country`, cl.`name` as country FROM `ww_ps_address` a LEFT JOIN `ww_ps_country_lang` cl ON (cl.`id_country` = a.`id_country` AND cl.`id_lang` = 1) LEFT JOIN `ww_ps_customer` c ON a.id_customer = c.id_customer WHERE 1 AND a.id_customer != 0 AND c.id_shop IN (1) AND a.`deleted` = 0 ORDER BY a.`id_address` ASC Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now