2

I'm looking for a way to use exp:query in entries. So far I haven't been able to find this. I know it's not recommended but for what I'm trying to build it's most feasible to do so. That way I'll be able to get data from other datatables.

3

You'll need to use the Allow EE Code plugin, and wrap your field with it on the front-end:

{exp:allow_eecode query="y"}
    {my_field}
{/exp:allow_eecode}
| improve this answer | |
  • Hi Derek, That sounds great, thanks a lot! I'm going to try it right now, but reading the plugin description seems exactly what I'm looking for. – Danny Mar 7 '13 at 14:21
  • I just implemented it and it did the trick, thank you for your help!! – Danny Mar 7 '13 at 14:29
  • Great to hear, glad that sorted it. – Derek Hogue Mar 7 '13 at 14:40
1

Are you planing to put exp:query code in your channel entries ?

If so, there has to be a better way to achieve the result you're going for than having to put sql queries in your channel entries ( and within range of your clients )

Perhaps you could give us some more info about what you're trying to do ?

| improve this answer | |
  • Hi janvl, thanks for your reply. For this particular channel, only super admins can add content. The thing is, it's a channel where every entry represents a chart. These are generated using Google Charts. In the Google Charts code there is a datatable which you need to fill. Currently the data saved static in the post, but I want to query it so I have more freedom when doing a query, plus I don't have to duplicate data when I want to show it somewhere else. – Danny Mar 7 '13 at 10:57

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.