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.

Seperate DB connection

June 10, 2011 10:46am

Subscribe [2]
  • #1 / Jun 10, 2011 10:46am

    TheRoundhouse

    4 posts

    Hi all,

    I’m working on a site where we’ll need to pull data from the clients’ CRM system which runs on SQL Server.

    We’ve got a proof of concept together which allowed us to get a PHP ODBC connection going and pull some data from CRM based on the current user’s ID. This is great but when I’ve tried to tidy it up I come across a problem. I wanted to set the connection up in an embed and then use that throughout the site rather than repeating the same code in multiple templates. Since php variables and objects can’t be passed around between templates I’m not sure if this is possible.

    Is there a suitable method for this?

    Many thanks,
    Gavin

  • #2 / Jun 10, 2011 10:51am

    Kernon

    173 posts

    Gavin,

    Perhaps using a PHP session would work for this?

    See: Session Variables Plugin

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

ExpressionEngine News!

#eecms, #events, #releases