corrected SQLSTATE[HY000]: General error: 2031
by adding bind before every query