MINOR: remove raw SQL, delegate to DB
MINOR: remove raw SQL, delegate to DB

Olliepop/silverstripe-forum,gordonbanderson/silverstripe-forum,gordonbanderson/silverstripe-forum,mandrew/silverstripe-forum,camfindlay/silverstripe-forum,camfindlay/silverstripe-forum,Olliepop/silverstripe-forum,mandrew/silverstripe-forum