View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005208ATutorMultiSitepublic2013-02-25 16:122018-03-13 17:24
Assigned Togreg 
PlatformOSOS Version
Product Version 
Target Version2.1.1Fixed in Version 
Summary0005208: queryDB switch db source
DescriptionCurrently there is no way to access more than one database with queryDB. Need a way to specify the db handle. Eg when upgrading subsites.
TagsNo tags attached.
Affects versionSVN
SVN Revision#
Attached Files

- Relationships

-  Notes
greg (administrator)
2013-03-04 15:00

Is it possible to implement the following logic in ATutor and AContent

/ multisite is loaded /
/ figure out what $db object should be created for that particular multisite /
/ cache it if not cached /
/ Create a function which would be able to return a proper $db object based from the cache based on the multisite /
/ Replace global $db; with $db = func_to_return_db(); in queryDB /

This way queryDB stays atomic with less parameters. It still would work and will require developer NOT care about multisite or other extra parameters and concentrate on the business logic WHICH IS: SQL query and its parameters.
At the same time func_to_return_db() will be one of the core ATutor functions which would not need any developer's intervention (I guess it depends on its implementation) and could be used outside of queryDB (if needed)

Personally, I do not want to pass any extra $db parameter into queryDB() to keep it simple and to make a developer worry only about SQL queries and what they return.

These are just few of my thoughts about this matter.
Let me know what do you think.


- Issue History
Date Modified Username Field Change
2013-02-25 16:12 greg New Issue
2013-03-04 15:00 greg Note Added: 0006194
2018-03-13 17:24 greg Status new => closed
2018-03-13 17:24 greg Assigned To => greg
2018-03-13 17:24 greg Resolution open => suspended

Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker