OsakaWebbie
Programmer
I have several installations of a PHP/MySQL application I wrote. I am gradually moving all of them to better hosters who are running newer versions of the server apps. I have two copies running successfully on hoster A, who is running MySQL 5.0.45 (the old hoster was still on 3.23 - ack!). I just now moved another installation to hoster B, who I have not used before but who also is running MySQL 5.0.45. The settings listed in the MySQL section of phpinfo() look the same for both hosters. But on hoster B I'm getting a mysterious SQL error - I can only assume it is a compatibility thing, but the error message is not helpful. Here is the query:
And here is the complaint:
Code:
SELECT DISTINCT person.PersonID, FullName, Furigana, Email, CellPhone, Phone, TempAddress, postalcode. * , Address, person.Photo
FROM person, percat
LEFT JOIN household ON person.HouseholdID = household.HouseholdID
LEFT JOIN postalcode ON household.PostalCode = postalcode.PostalCode
WHERE person.PersonID = percat.PersonID
AND CategoryID =22
ORDER BY Furigana
I can assure you that the column does indeed exist, and other queries in my code that reference that column work fine. (Yes, there is a reason I do two joins using JOIN but a third using the WHERE clause - the query is dynamically constructed from complex criteria.) I can only assume that something is different between hoster A and hoster B in their configuration of MySQL, but can someone suggest what to look for?SQL Error 1054: Unknown column 'person.HouseholdID' in 'on clause'