mysql - Filter SQL result? -


i got same emails in status 3 , 1. , need show emails of status 3 query showing me in page of status 3 email status 1

here query:

 select live_customers.id, live_customers.date,         live_customers.firstname, live_customers.lastname, live_customers.phone,         live_customers.phone2, live_customers.email, live_customers.num_sellers,          live_customers.sell_date,live_customers.public_description,           live_customers.public_image, live_customers.price,         live_customers.takanon, live_customers.confirm_mail_sent, live_customers.paid,         live_customers.shirt_size, live_customers.shirt_size_extra,          live_customers.stand_rent, live_customers.refunded, live_customers.call1,         live_customers.call2, live_customers.notes,         live_customers.auth_number, live_customers.hascontact, live_customers.ip,          live_customers.status, live_status.name statusname,          live_status.color statuscolor, live_compound.name compoundname     live_customers         inner join live_status                     on live_status.id=live_customers.status                   inner join         left join live_compound                     on live_compound.id=live_customers.compound_id    live_customers.status='3'                             group          live_customers.id     order          live_customers.id desc     limit 0,30 

you have mixed both inner join , left join ...

try this

select live_customers.id, live_customers.date,         live_customers.firstname, live_customers.lastname, live_customers.phone,         live_customers.phone2, live_customers.email, live_customers.num_sellers,          live_customers.sell_date,live_customers.public_description,           live_customers.public_image, live_customers.price,         live_customers.takanon, live_customers.confirm_mail_sent, live_customers.paid,         live_customers.shirt_size, live_customers.shirt_size_extra,          live_customers.stand_rent, live_customers.refunded, live_customers.call1,         live_customers.call2, live_customers.notes,         live_customers.auth_number, live_customers.hascontact, live_customers.ip,          live_customers.status, live_status.name statusname,          live_status.color statuscolor, live_compound.name compoundname     live_customers         inner join live_status                     on live_status.id=live_customers.status                   inner join live_compound                     on live_compound.id=live_customers.compound_id    live_customers.status='3'                             group          live_customers.id     order          live_customers.id desc     limit 0,30 

Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -