Query and execute without static var in CategoryID
More avoiding use of static vars

See parent for reasons
Finish removing static database connections.
Construct PDO as  var for use with escaping later
Remove commented out code