fix mysql insert and select