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.
2 Answers
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}
-
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.– DannyMar 7, 2013 at 14:21
-
-
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 ?
-
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.– DannyMar 7, 2013 at 10:57