running extension without additional statement

(2 posts) (2 voices)

Tags:

  1. rwchhs, Member

    Hi,

    I was wondering how I could make my own extension function "do" something without having to add another statement after it in the procedure. Take the dummy extension for example. If I just write

    SELECT "dbr.dummy", "test"

    then this will not print anything, I would have to add another statement so that $colInfo and $dataIn get populated, for example

    SELECT "dbr.dummy", "test";
    SELECT "";

    So let's assume I have my own extension and I don't really need it to work on any rows, I just want it to do something silently, maybe write a file to the disk or call a webservice. Then it would be nice if I could do without the second "SELECT '';" and just write

    SELECT "extension.function", "param"

    and be done with it. Similarly to how dbr.html works, I can just write

    SELECT "dbr.html", "<b>test</b>"

    and that prints everything I need.

    I've looked at the docs and the stock extensions but haven't really found anything that points me in the right direction, can you help me with this?

  2. myDBR Team, Key Master

    An extension is invoked with a result set. If you do not need any data to your extension, just return any result set (like your empty string).

    --
    myDBR Team


Reply

You must log in to post.