• Hey,
    is it possible to publish a result of a query with a shortcode on a page? I have understand it is a good idea to make a view an publish the view. But my problem is a complex union-query with using the $$USER$$ in where clause. An I think, I can not use %%USER%% in a view.
    Regards
    Frank

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi Frank,

    >>> An I think, I can not use %%USER%% in a view.

    You are correct! $$USER$$ is a WP Data Access environment variable and is not available in your view. But you can use it in the where clause of your publication.

    Does this help?

    Thanks,
    Peter

    Thread Starter WolkeSieben

    (@wolkesieben)

    Thank you,

    >>But you can use it in the where clause of your publication.
    >>Does this help?

    Sorry. No is doesn’t help. The query is very complex (with UNION and a subselect), so I have 3 places for the $$USER$$ in a where clause.

    Is there a plan for the future to implement querys? Just like the plugin WPTABLES, what I use for this.

    Regards
    Frank

    Have you considered making a view from your query and using it in your publication? I don’t know your query so I can’t recommend a district solution.

    Thread Starter WolkeSieben

    (@wolkesieben)

    No, the query is too much complex.

    Regards
    Frank

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi,

    >>> Is there a plan for the future to implement querys?

    Yes, this is planned. But effectively this would be the same as creating a view, like Charles mentioned. Can you share the query? Can we help somehow?

    Please use the contactform on the plugin website if you prefer to share information in private.

    Thanks,
    Peter

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Output a query result’ is closed to new replies.