fixing lib_curate mysql syntax error