Many older applications have been failing due to non standard queries which produce errors about columns not existing.
In most instances, merely changing the order of tables is enough to fix a statement.
Example:
The above produces an error about column f.id not existing, when we know it does.SELECT f.* from forums f ,categories c LEFT JOIN moderator m
ON (f.id=m.forum_id) WHERE f.category=c.id
My merely switching the order of the table references:
categories c and forums f
we fix the problem.
SELECT f.* from categories c,forums f LEFT JOIN moderator m
ON (f.id=m.forum_id) WHERE f.category=c.id
Please refer to the following link for more info.
http://dev.mysql.com/doc/refman/5.0/en/join.html
See particularly "Join Processing Changes in MySQL 5.0.12


LinkBack URL
About LinkBacks

Reply With Quote