An ambigous query would be like this one :
I got TableA with fields ( a,b,c,X) and TableB with fields (h,j,k,X) and I perform the following query:
SELECT a,b,j,k,X FROM TableA LEFT JOIN TableB USING (X) ORDER BY X DESC
This would naturally give me fields a,b,j,k,X with no problem but this causes and ambiguity since X is in both tables and MySQL wouldnt know by which of the sort or which one of them return me, however this is not the correct way to do a JOIN the correct way would be
SELECT a,b,j,k,TableA.X FROM TableA LEFT JOIN TableB USING (X) ORDER BY TableA.X DESC
In this example I'm specifying the correct way which X i need and by which X i want to sort the results
I Got alot of querys like the first one on my system which resides on my webhost , but as soon as I run the same system on my local machine I start getting alot of errors , I'd love to correct all my querys , but I need a quick solution meanwhile , so I can run the system on a backup server
Does anyone got an idea ?