I am currently trying to create a fairly basic web app in which to keep sensitive data for users Capacity and their organizations
I intend to store all recorded records of all users in one DB and all app data in another DB. This data will be stored in shared DB for all records in all tables with a user_id and org_id separation.
To minimize the risk of code errors and data agreements, I have discovered the ability to automatically attach the standard 'where' statement using my active record questions < Pre> This is magnificent and will save many headaches. However, according to the documentation, I should also be able to use it for update (set method): Note: The following statements can be cached: selection, from, joining, where , E.g., Active_Record Class "DB_active_rec.php" has code available to provide caching in many ways (select, ou etc). I I can tell that the system seems to disappear from the system. I am not sure which answer I am after, but hopefully I am just doing it wrong! You can not cache the update statement. It does not matter much In your update, you can enter $ this-> Db- & gt; Start_cache (); $ This- & gt; Db- & gt; Where ('user_id', $ _ session ['user_id']); $ This- & gt; Db- & gt; Where ('org_id', $ _ session ['org_id']); $ This- & gt; Db- & gt; Stop_cache ();
if ($ this-> ar_caching === TRUE) {... caching content
$ this-> Db- & gt; Where () method, which is essentially a selection, that part can be cached, and by doing so you can save yourself a select statement.
Comments
Post a Comment