All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Can i use Low ReOrder in combination with exp:query?

iterson 19 Sep 2012 14:47 problem, active

Original Query:

{exp:query sql='SELECT
d.field_id_53 AS "cf_penningen_tekst_nl",
d.field_id_54 AS "cf_penningen_tekst_en",
t.title AS "title",
t.url_title AS "url_title",
d.field_id_51 AS "cf_penningen_nr",
d.field_id_52 AS "cf_penningen_title_en",
d.field_id_60 AS "cf_penningen_prijs",
d.field_id_56 AS "cf_penningen_kwaliteit_nl",
d.field_id_55 AS "cf_penningen_kwaliteit_en",
d.field_id_51 AS "cf_penningen_reference",
d.field_id_61 AS "cf_jaartal",
t.entry_date,
d.field_id_50 AS "cf_penningen_volgorde",
d.field_id_66 AS "cf_penningen_afb_1",
d.field_id_67 AS "cf_penningen_afb_2",
d.field_id_65 AS "cf_penningen_techniek",
d.field_id_64 AS "cf_penningen_ontwerper",
d.field_id_63 AS "cf_penningen_metaalsoort",
d.field_id_49 AS "penningencatid"
FROM
exp_channel_titles AS t NATURAL JOIN
exp_channel_data AS d
WHERE
t.status = "Open" AND
channel_id = 7 AND
d.field_id_49 = 1
ORDER BY d.field_id_50 DESC'}

Stopt working because the order field isn't a fieldtype anymore

Replies

  1. Low 19 Sep 2012 14:52

    It's not as straight-forward as that anymore, I'm afraid. You could use an embed; out the query tag in an embed and use this:

    {embed="some/tmpl" entry_ids="{exp:low_reorder:entry_ids set='1' separator=','}"}


    Then change the ORDER BY clause in the query to

    ORDER BY FIELD(t.entry_id, {embed:entry_ids})

  2. iterson 20 Sep 2012 07:41

    Thanks for the Reply, going to look in to this solution.