I have a website which until yesterday was running EE v1.6.7. Other than occasional defacing due to unpatched security vulnerabilities it was working well enough {/tongue-in-cheek}. Forced by system php upgrade to v5.4 I've upgraded the site to EE Core v2.9.2, only to discover that the {exp:query} relied on heavily throughout the templates no longer work, because the query module is now part of the upgrade version.

I only want to limp the site along long enough to replace it with a new design using an entirely different software stack, without Expression Engine. Paying $300 for a to-be-discarded program is not attractive. I've nothing against EE, it's just not the right tool for this site or a good match for the rest of our organization and it's processes.

In EE Core, what can I use as an alternative to the kinds of queries below while the new site is incubating?

{if segment_3 == "1"}
    {exp:query sql="SELECT * FROM exp_categories WHERE parent_id = '1' ORDER BY cat_name ASC"}

if you don't mind of to write the queries as Active Record, you can use the Active Record Plugin.

But maybe you don't need that so much as you think. Sometimes, the default tags can do the job.


For completeness sake, here is the working Active Record equivalent to the exp:query; nothing else in the templates needed to be changed.

{if segment_3 == "1"}
    {!--exp:query sql="SELECT * FROM exp_categories WHERE parent_id = '1' 
         ORDER BY cat_name ASC"--}
  • Active Record plugin did the trick. It was easier by far than trying to recode to use the system default tags, as only the queries needed to be modified, and the syntax is very nearly equivalent. The result tags didn't have to be touched at all. Getting the plugin to work in the first place took some trial and error; I had to figure out which Addons sub-category it ended up in (Plugins, for the record), as all of them refer to the third_party folder, and EE was slow to notice it's presence. – matt wilkie Nov 14 '14 at 23:10
  • I said it's a plugin! But I understand you. It's obvious only for who uses eecms all the time. – Sobral Nov 15 '14 at 0:03
  • re: plugin, yes you said, but when it didn't show up in the plugins page of the control panel for many minutes and refreshes I thought maybe you were using the word in a more general sense. Thanks much for pointing me in the right direction. – matt wilkie Nov 15 '14 at 0:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.