As the above error suggests, there is an error in mysql query formation.
Active Records Query are formed in DB library called
DB_active_rec. So actually though the error is in
coreMY_Model.php but it belongs to the line where function
DB_active_rec Class gets called.
So i don’t see any issue in the above error path.