We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

What are my options for using PHP in a {exp:query} tag?

Development and Programming

brianearwood's avatar
brianearwood
40 posts
14 years ago
brianearwood's avatar brianearwood

Hi everyone,

I’m trying to use some php in my query tag in order to qualify and filter what will go in the WHERE clause to customize the output.

I’m running into the problem of conflicting php parse orders though.

While the query tag requires that php be set to ‘input’, the rest of my php code needs to be on ‘output’ in order to utilize data from exp tags (which the query tag needs to use also).

Anyone had any trouble with this before? Do I need to combine multiple sql queries into one in order to avoid using php in the query?

Thanks for the help!

Brian

       
the3mus1can's avatar
the3mus1can
426 posts
14 years ago
the3mus1can's avatar the3mus1can

It really depends on what you are trying to accomplish, but you could probably move some of the PHP code into a custom plugin to get around parse order issues.

       
brianearwood's avatar
brianearwood
40 posts
14 years ago
brianearwood's avatar brianearwood

Thanks, I’ll look into that

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.