On mer, 2008-07-30 at 09:47 -0400, Earnie Boyd wrote:
Quoting Pierre Rineau pierre.rineau@makina-corpus.com:
You MUST use two same database type.
Explaination is simple, since Drupal files with pgsql support and mysql support declare the same function's names inside, it's just impossible to go through this situation.
Yes, this is most unfortunate. I've an idea of how to fix it but I won't even begin until after the PDO patch is in.
Using OO it could be possible, but Drupal is not OO.
What an odd sentence. Drupal doesn't need to use classes and instantiation to resolve this bit of hardship. It just needs to use the database type to resolve which function to hook from the global function name. So I call db_query() in my module but that will call db_query_mysql() or db_query_pgsql() dependent on the type of the DB active at the time. Currently the design declares the same db_query() function within more than one file which is really sad.
Yes, I agree with that, this was a wonderfull troll :)
But it should go with a dynamic database type resolving based on active database type.
It really could be easy to implement.
Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/