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 3 of 3
  1. #1
    New Coder
    Join Date
    Aug 2011
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Show Duplicate rows

    Awesome thank you so much!!! I also have another question for you. here is my code

    Here is my code, it looks fine me "I am not great at MYSQL yet"

    PHP Code:
    $query_str99 "SELECT lead_type, afid_seller_name, partner_id_buyer, price_buyer_paid, price_CIQFY_paid, time, email "
                      
    " FROM lead_partners_pages "
                      
    " INNER JOIN (SELECT email FROM lead_partners_pages GROUP BY email HAVING count(id) > 1) dup ON email = dup.email "
                      
    " WHERE date_month = MONTH(NOW()) "
                      
    " ORDER BY id DESC "
    But I am getting this message

    Code:
    Column 'email' in field list is ambiguous

  • #2
    Super Moderator guelphdad's Avatar
    Join Date
    Mar 2006
    Location
    St. Catharines, Ontario Canada
    Posts
    2,634
    Thanks
    4
    Thanked 148 Times in 139 Posts
    The "ambiguous" error means that more than one table has the same named column, but you have not specified which table so the database can't perform the call.

    specify lead_partners_pages.email in the select statement instead of just email.

  • #3
    New Coder
    Join Date
    Aug 2011
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by guelphdad View Post
    The "ambiguous" error means that more than one table has the same named column, but you have not specified which table so the database can't perform the call.

    specify lead_partners_pages.email in the select statement instead of just email.

    Thank you!


  •  

    Posting Permissions

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