Correction of joint statment for mysql 5.0.x compatibility.

More...