fixed prepared statement for writeSale(). it works!