Re: Not Unique Error
You are INNER JOINING the country table to the query twice without giving the query separate aliases for each. Also, you are providing only one set of join conditions so you are going to make a Cartesian product with one of those joins. Looks to me like you only need the table once. Here's my suggestion: SELECT users.UserName, users.userID, users.lastip, users.totallogins, users.lastbrowser, users.lastlogin, users.Password, users.person, users.entryid, users.namerep, users.countryid, country.countryid, country.image, country.countryid, country.country FROM Users INNER JOIN Country ON country.countryid = users.countryid WHERE UserName = 'angelica' AND Password = '4598734' Shawn Green Database Administrator Unimin Corporation - Spruce Pine EWA Goodson-Wickes [EMAIL PROTECTED] wrote on 10/23/2004 09:32:24 PM: Hi all, I am using Navicat to connect to my MySQL database. I get the following error when I try a query even though there is only one table called Country. Why do I get this error? Thank you for any advice Error: 1066 Not Unique Table/Alias Country QUERY: SELECT users.UserName, users.userID, users.lastip, users. totallogins, users.lastbrowser, users.lastlogin, users.Password, users.person, users.entryid, users. namerep, users.countryid, country.countryid, country.image, country.countryid, country.country FROM Users, Country INNER JOIN Country ON country.countryid = users.countryid WHERE UserName = 'angelica' AND Password = '4598734'
Re: Not Unique Error
SELECT u.UserName, u.userID, u.lastip, u.totallogins, u.lastbrowser, u.lastlogin, u.Password, u.person, u.entryid, u.namerep, u.countryid, c.countryid, c.image, c.countryid, c.country FROM Users as u, Country as c INNER JOIN Country as cc ON cc.countryid = u.countryid WHERE UserName = 'angelica' AND Password = '4598734' This might work for you. I don't know how optimal it is but it separates the definitions of the country table with different aliases. On Sat, 23 Oct 2004 20:32:24 -0500, EWA Goodson-Wickes [EMAIL PROTECTED] wrote: Hi all, I am using Navicat to connect to my MySQL database. I get the following error when I try a query even though there is only one table called Country. Why do I get this error? Thank you for any advice Error: 1066 Not Unique Table/Alias Country QUERY: SELECT users.UserName, users.userID, users.lastip, users.totallogins, users.lastbrowser, users.lastlogin, users.Password, users.person, users.entryid, users.namerep, users.countryid, country.countryid, country.image, country.countryid, country.country FROM Users, Country INNER JOIN Country ON country.countryid = users.countryid WHERE UserName = 'angelica' AND Password = '4598734' -- People believe I am what they see Me as, rather than what they do not see. But I am the Great Unseen, not what I cause Myself to be in any particular moment. In a sense, I am what I am not. It is from the Am-notness that I come, and to it I always return. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Not Unique Error
Hi all, I am using Navicat to connect to my MySQL database. I get the following error when I try a query even though there is only one table called Country. Why do I get this error? Thank you for any advice Error: 1066 Not Unique Table/Alias Country QUERY: SELECT users.UserName, users.userID, users.lastip, users.totallogins, users.lastbrowser, users.lastlogin, users.Password, users.person, users.entryid, users.namerep, users.countryid, country.countryid, country.image, country.countryid, country.country FROM Users, Country INNER JOIN Country ON country.countryid = users.countryid WHERE UserName = 'angelica' AND Password = '4598734'