database update
fixed the bug in posting function 

modify the sql for only posting the data in group 0 and 2