I have a logging system setup. The main DB keep track of the time, page, and IP address of the person visiting. The second DB is a DB of IP addresses and who they belong to.
I was able to do the successfully using this
SELECT * FROM `loggingdetailed` LEFT JOIN ip_addresses ON loggingdetailed.IP = ip_addresses.IP ORDER BY `record` DESC LIMIT 0 , 100
Now I want to remove my IP address from the loggingdetailed results. I tried using this:
SELECT * FROM `loggingdetailed` LEFT JOIN ip_addresses ON loggingdetailed.IP = ip_addresses.IP WHERE `loggingdetailed.IP` != CONVERT( _utf8 'x.x.x.x' USING ascii ) COLLATE ascii_general_ci ORDER BY `record` DESC LIMIT 0 , 100
But that is returning: "#1052 - Column 'IP' in where clause is ambiguous "
So I tried where loggingdetailed.IP != .... it resulted in: #1054 - Unknown column 'loggingdetailed.IP' in 'where clause'
What is the proper syntax to do what I want?