fixed sql bug in getUserPrevious
Merge pull request #36 from lievnano/dev

fixed sql bug in getUserPrevious