Using Other Databases in Templates
-
Alright, I’m trying to do something really stupid here, I have a Page set up to use a particular custom template I’ve created.
This custom template includes some other PHP file after it displays the Page content. This PHP file (among other things) makes a database connection. Somehow, this database connection replaces the connection that WordPress was using.
If I don’t close the connection, I see “Table doesn’t exist” errors, and the error indicates it’s looking for the table in the database that this other PHP file used. If i DO close the connection, It simply displays nothing, as if it couldn’t retrieve the data (which, if it’s looking at a closed connection, makes sense).
So, to make this long explanation short: Any way to fix this? is this poor programming in WordPress, or simply a limitation of mySQL (which doesn’t seem like it is)?
- The topic ‘Using Other Databases in Templates’ is closed to new replies.