ainaraip Posted June 5, 2018 Share Posted June 5, 2018 Hola, ¿Alguien podría echarme un cable con esto? Necesito hacer una consulta Sql a la base de datos para extraer los datos Nombre, apellido, teléfono y email, de las personas que actualmente tienen un vale descuento en mi tienda online. Gracias :-) Link to comment Share on other sites More sharing options...
Rodrigo.a87 Posted June 14, 2018 Share Posted June 14, 2018 Hola! No uso esa funcionalidad en mi tienda por lo que no podría probar la consulta. Probá lo siguiente: SELECT c.id_customer AS 'ID Cliente', c.firstname AS 'Nombre', c.lastname AS 'Apellido', c.email AS 'Email', a.phone AS 'Telefono', crl.name AS 'Vale' FROM ps_customer AS c JOIN ps_address AS a ON c.id_customer = a.id_customer JOIN ps_cart_rule AS cr ON c.id_customer = cr.id_customer JOIN ps_cart_rule_lang AS crl ON cr.id_cart_rule =crl.id_cart_rule WHERE cr.id_cart_rule > 0 GROUP BY c.id_customer Saludos! (Versión 1.6 de PrestaShop) 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