public static function renderSQL( $input, $args, $parser, $frame ) { try { $s2w = new SQL2Wiki( $args ); $sql = ( $s2w->shouldPreexpand() ) ? $parser->recursiveTagParse( $input ) : $input; if ( !$s2w->execute( $sql ) ) { return $s2w->mError; } if ( ( $inline = $s2w->getInlineTag() ) !== false ) $ret = $s2w->parseInline(); else $ret = $s2w->parseTable(); $ret = ( $s2w->shouldExpand() ) ? $parser->recursiveTagParse( $ret ) : $ret; $ret .= $s2w->handleCache( $parser ); return $ret; } catch ( Exception $ex ) { return $ex->getMessage(); } }