ExpressionEngine: {exp:query} producing error
- by Josh Brown
Hi.
I have this code in place to pull some relation data from the database based on a ID of another weblog entry. The relationship custom field would not work for my situation. I have tested the SQL with MySQL and get no errors. But I get an error when I pull up the page.
{exp:query sql="SELECT entry_id,field_id_16,field_id_19 FROM exp_weblog_data WHERE field_id_15='2' AND weblog_id='6'"}
Also, I want to populate the “field_id_15” from the url. I have tried using the “segment_*” tag, but nothing. Maybe it is something else.
Any help is greatly appreciated.
Thanks, Josh