fix sql for post