ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Query tag not picking up change in database structure

February 26, 2014 10:58am

Subscribe [1]
  • #1 / Feb 26, 2014 10:58am

    Scott-Parks

    14 posts

    I’m having a problem using the EE Query tag.

    I’ve used a Query in EE to access a non-EE table of data in our database.  Here’s the basics of the query tag.

    {exp:query sql="SELECT col1, col2 FROM my_non_EE_table; "}
          {col1}, {col2}
    {/exp:query}

    I’ve run this page/query and it returns the col1 and col2 without issue.

    The issue I’m having is, I’ve modified the structure of my table now, adding a 3rd column (col3) and run this query:

    {exp:query sql="SELECT col1, col2, col3 FROM my_non_EE_table; "}
          {col1}, {col2}, {col3}
    {/exp:query}

    Running the latest query I get a MySQL active record error that says the column ‘col3’ doesn’t exist.  I’ve tested this basic query direct in mysql, and it works fine.

    I’ve tried emptying the caches in EE, all of them and I still get the same error.  Why is EE query tag not picking up the change in my database?

    Any help or ideas are appreciated.

    Thanks

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases