PearDB inside extension/module

PearDB inside extension/module

Thursday 16 December 2004 12:23:51 pm - 1 reply

Author Message

Dan C

Thursday 16 December 2004 6:26:53 pm

For anyone else experience similar problems... I haven't found out what the problem is, but I have a solution.

I'm thinking perhaps the problem is related to ezDb not using mysql_select_db properly or something... but it doesn't entirely make sense because pearDB and ezDb should be using different link id's... so I wasn't able to figure it out with my testing. I tried using global variables, local variables inside functions, static variables inside classes... and it was always the same problem.

Here's my solution:

I get peardb to connect to the 'ezpub' database, and every SQL query I do needs to be in the form of 'SELECT * FROM otherdb.tablename' -- in other words, I just specify the name of the other DB I want to access and this seems to keep ezDb happy and inside the correct database.

Dan

You must be logged in to post messages in this topic!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.