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.

server error when updating template

September 04, 2008 10:26pm

Subscribe [1]
  • #1 / Sep 04, 2008 10:26pm

    rgres

    4 posts

    aloha all -

    i have a new commercial install of EE and i am attempting to access some mysql tables not part of the EE database through a php block in an EE template. (different mysql database but same database user as the EE database)

    i am getting a Server Error when trying to update the template whenever i include the mysql keyword “FROM” inside of a php block. (php has been enabled for the template with input parsing). even if i remove “FROM” from the query string and place it anywhere within the php block and try to update the template i get the error. if i make the slightest change to “FROM” (like deleting any one of the letters or the whole word itself) the template updates normally saving the changes.

    i searched the forums to no avail. can anyone point in a reasonable direction to figure this out?

    just some extra info:  the php code will execute and the query runs normally if i put the code in a separate .php file, upload to the server, and call the file from a browser.

    thanks in advance for any assistance . . .

    ric

  • #2 / Sep 04, 2008 10:33pm

    Greg Aker

    6022 posts

    rgres:

    This might be beyond what we can offer as far as official tech support goes.  However, is there a reason for wanting/needing to use a second DB for this information?  If you are working with the same DB that ExpressionEngine is on, you can take advantage of the query module & the db class in the developer docs.

    -greg

  • #3 / Sep 05, 2008 4:26am

    rgres

    4 posts

    many thanks, greg, for the reply greg. you have pointed me in the right direction. we have another web app that needs its own database. (this app queries an MLS real estate server to get data on listings and stores that data in the separate database). we will probably do something like copy of real estate db into our ee db and then update the copied tables immediately after the nightly MLS server query from the real estate web app runs. we paid for the real estate web app as part of our hosting plan, and our web host is very helpful with this sort of stuff. i just wanted to make sure i wasnʻt making a really simple error in EE with a really simple fix.

    again, thanks for the helpful suggestions.

    ric

  • #4 / Sep 05, 2008 2:15pm

    Greg Aker

    6022 posts

    Ric:

    I’m glad you have a plan.  Please post back if you run into any stumbling blocks.  😊

    Regards,

    -greg

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

ExpressionEngine News!

#eecms, #events, #releases