Add getLastQuery for debugging
Store last statement error as mysqli->error is not including them.