Fixed SQL so that properly uses the column name configRev. Also improved
some comments and changed a parameter to use the proper name
"configRev".