Atrhick
10-21-2011, 02:40 PM
I want to get everthing from my table and exclude a few rows... but my query it not working. this is my query and the rows I want to exclude.
$strQuery = "SELECT partner_id_buyer "
. " FROM lead_partners_pages "
. " WHERE partner_id_buyer < 10 OR option = ' ' OR option = '[partner_code]' "
. " GROUP BY partner_id_buyer "
. " ORDER BY partner_id_buyer "
." AND MONTH(date_day)=MONTH(NOW())";
I don't want any rows in the partner_id_buyer column that is blank, has a number less than 10, also want to exclude the rows with [partner_code]. is this possible?
$strQuery = "SELECT partner_id_buyer "
. " FROM lead_partners_pages "
. " WHERE partner_id_buyer < 10 OR option = ' ' OR option = '[partner_code]' "
. " GROUP BY partner_id_buyer "
. " ORDER BY partner_id_buyer "
." AND MONTH(date_day)=MONTH(NOW())";
I don't want any rows in the partner_id_buyer column that is blank, has a number less than 10, also want to exclude the rows with [partner_code]. is this possible?