Hello,
Im using wordpress and gallery in one database. And I'm planning to create a php script that will select between the tables of wordpress and gallery. And im thinking of using the DB connection of gallery..
Quote:
$storage =& $gallery->getStorage();
is this possible? Can I select data from wordpress table (with different prefix from gallery table) using this connection.? Are there any other work-around on this?
regards,
--reynan
Gallery version (not just "2"): 2.2.1
PHP version (e.g. 4.3.11): 4.3.11
PHPInfo Link (see FAQ):
Webserver (e.g. Apache 1.3.33): 1.3.33
Database (e.g. MySql 4.0.11): 4.0.11
Activated toolkits (e.g. NetPbm, GD):
Operating system (e.g. Linux): Linux
Browser (e.g. Firefox 1.0): firefox 1.5
Posts: 8601
I think it's ok... if you use $gallery->search or $storage->execute then use the gallery syntax for gallery tables (like [GalleryItem] or [GalleryEntity::id]) but use the actual table/column names for wordpress tables.