Sugestion:
In "SQL2Wiki.body.php", replace:
$sql = ( $s2w->shouldPreexpand() ) ? $parser->recursiveTagParse( $input ) : $input;
by:
$sql = ( $s2w->shouldPreexpand() ) ? $parser->recursiveTagParse( $input, $frame ) : $input;
See: http://www.mediawiki.org/wiki/Manual:Tag_extensions#Extensions_and_Templates
Thanks.