-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert db calls to PDO, allow support for multiple back-end engines #164
Comments
… that we'll start using PDO rather than mysql_* calls. This will need to be manually updated for all users as we convert - will need to test for the connection in the next install.php and display a message to the user if we can't connect. #164
… I have not removed the parameter passed to the methods as that will happen as we replace all calls to the Config class. #164
…e calls and tested for functionality. #164
Updated all of the User class methods to use PDO Library per #164 Updated the dc_stats, cabnavigator, and devices pages to base viewership on what departments a user is a member of, rather than the global ReadAccess right. Use cabnavigator.php as the reference for how to handle the new right scheme. #185
We need a better way of displaying these as this completely breaks things and in turn also was completely useless in figuring out what happened. [Fri May 17 20:31:31 2013] [error] [client 129.59.141.208] PHP Warning: PDO::exec(): SQLSTATE[HY000]: General error: trying to execute an empty query in openDCIM/assets.inc.php on line 887, referer: devices.php?action=new&cabinet=2 [Fri May 17 20:35:50 2013] [error] [client 129.59.141.208] PHP Warning: sprintf(): Too few arguments in openDCIM/assets.inc.php on line 885, referer: devices.php?action=new&cabinet=2 And there is a perfect argument on why sprintf is bad for these statements. |
There's a PDO parameter we can set that will put the errors in the error log. |
…d. Need to propagate to the rest of the calls for consistency. #164
Conflicts: assets.inc.php Fixed the error checking on the Device::CreateDevice method to send info to the error log. Need to do to the rest of PDO calls for consistency. #164
…ted malfunctioning date and equipment type parameters in same functions. Updated a few translation strings to sprintf with static variables per best practices. Updated all translation files. #164
…s that call other classes still must include the $db parameter until we're finished. #164
…A few functions are producing no data on return and it was interpreting that as an error even though it was a valid response. We need to be careful on straight select statements not to log an error if there is nothing returned. #164
…here methods have been changed and it was never updated. Need to revisit and see if this page is even needed, it was added @e13e35e
…name for #137 fac_cabrow vs. fac_CabRow
…dated. Went ahead and ran a new gettext translation update as well. #164
…laces the methods are used and remove the db variable from them though. Out of time for this morning. #164
…stone was seeing with the updating a department.
…erting all remaining instances of mysql_query #164
Closing. |
With the combination of the existing mysql() calls being deprecated in the near future, and the political fallout of Oracle regarding MySQL, convert all calls to the PDO abstraction library. This will allow for various DB back-ends, as long as the SQL statements remain non version specific.
The text was updated successfully, but these errors were encountered: