Update SqlWalker.php

Rewrite Query for generic references