• Resolved adccmin

    (@adccmin)


    I start receiving this error message today:

    Pods Embed Error:?GROUP BY contains SQL that is not allowed.

    This is the shortcode used:

    [pods name=”content” limit=”-1″ where=”‘ . $where_param . ‘” template=”content_display” orderby=”CAST(first_line.meta_value AS DECIMAL), CAST(last_line.meta_value AS DECIMAL)” groupby=”CAST(first_line.meta_value AS DECIMAL), CAST(last_line.meta_value AS DECIMAL)” ]

    The groudby argument is used to prevent showing entries that have the same specific contents that I want to show from different PODS entries. (To simply put, to show only unique contents.)

    I have reduced the groupby parameter to just:

    groupby=first_line.meta_value

    and it still wouldn’t work. Only by removing the whole groupby argument will the error message go away and the code starts working again. Also for reference, orderby is working with the exact same parameters.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Scott Kingsley Clark

    (@sc0ttkclark)

    If you are in Pods 3.1 you can enable this by going to Pods Admin > Settings > Security > Allow SQL clauses to be used in Dynamic Features.

    You can set the value there to Unrestricted to enable GROUP BY (and others) again.

    Thread Starter adccmin

    (@adccmin)

    Thank you! Didn’t know it’s been turned into an option. It’s working just like before now.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Latest update broke “groupby”’ is closed to new replies.