I try to do a SELECT but I don't know why MySQL doesn't join my table with INNER JOIN on the primary key. He uses my foreign key instead...
My query :
SELECT cpte.*
FROM tcomptes cpte
INNER JOIN tentreprises_acteurs tentGest ON tentGest.nEntrepriseActeur = cpte.nGestionnaire
INNER JOIN tsites s on s.nSite = cpte.nSite
The problem is on the INNER JOIN of the table tsites.
There is the result of EXPLAIN instruction below :
Key uses by tsites table is a foreign key
Can you help me please ?
