Fixed encoder for prepared statements on MySQL, still needs more specs