On the road to allow GLPI to run on some other database engines, an intermediate goal is to eradicate SQL from the code.
This will be useful whatever future choice will be. So: - all add / update / delete should be run using the appropriate framework methods (CommonDBTM::add(), etc) - add select should use $DB->request. Open for discussion on docdev https://github.com/glpi-project/docdev/issues/1 Some recent commits about this - Remove SQL from Alert Class: https://github.com/glpi-project/glpi/commit/fb4b66b0a81599686015178ec3e2e4696855c8ea - Improve the DBmysqlIterator https://github.com/glpi-project/glpi/pull/1096 - suport COUNT(*) - support LEFT JOIN Intermediate goal, normalize all calls to countElementsInTable From countElementsInTable($table, $whereinsql); To countElementsInTable($table, [ criteria ]); Other goal: add documentation page for DB->request() Feedback ? Remi. _______________________________________________ Glpi-dev mailing list Glpi-dev@gna.org https://mail.gna.org/listinfo/glpi-dev