Fix SQL

Fixed sql in auction and category managers