Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Aug 2011
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Excluding rows from query

    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.

    PHP Code:

    $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?
    Last edited by Atrhick; 10-21-2011 at 03:53 PM.

  • #2
    New Coder
    Join Date
    Aug 2011
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts
    NVM I got it to work

    PHP Code:
    " WHERE afid_seller_name IS NOT NULL AND afid_seller_name NOT IN ('','0','9','[partner_code]') " 


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •