Quote from: Strider at Jul 21, 2005, 02:25 AM
You are right about the sort and dir. I am kind of surprized it didn’t include the editby=1 string. I could be way off base here but it looks like this came from a conversation between jaredc and benevolentdictator whoever they are.
Change noted.
This library is more a combination of Ralph’s DB functions and a few other db functions from MODx.
Susan,
The library was built to work inside MODx. If you want to use it independently then you have the power to modify it to do so. This brings me to the question of whether or not we should be building MODx specific libraries or general purpose libraries?
On the question on using the select function. The library does not limit you to such functions at all. You are free to use the query() function to perform all your database queries.
On the issue of using timinng functions. Etomite/MODx has being using these functions long before the DBAPI library. The timining functions are there to allow a developer to note the time it takes to run a query.
IMO the DBAPI function hopefully will make it easier when moving to other database engines. The select function for example aid the developer in writing SQL statements that are not tied to any specific engine.
Consider this:
MySQL: SELECT * FROM table1 LIMIT 10
MSSQL: SELECT TOP 10 * FROM table1
DBAPI: select("*","table1","","",10)
By loading the appropriate DBAPI library file (MySQL or MSSQL) the select function can generate the correct SQL syntax for that database.
Question:
Is it that the DBAPI is too difficult to use or should we replace it with a more general purpose library? If so which library would like to see added to the system?