Control Table Problem [message #2020] |
Sun, 26 April 2009 18:37 ![Go to next message Go to previous message](/theme/default/images/down.png) |
gpatti
Messages: 283 Registered: August 2008
|
Senior Member |
|
|
Tony,
I'm trying to emulate what you have done with the mnu_control table as described in your article 'A flexible method of storing control data', and by looking at your code in the menu app.
I've created a table of the structure you have suggested, and intend to use the field 'record_id' to identify an entity in the application for which I want to store configuration data. Each entity will then be able to store its own configuration, and each config item will be identified by its record_id, field_id primary key.
The data is being inserted and updated fine, but I noticed that when retrieving the data, entries for ALL record_ids are coming back. I tried adding record_id into the _cm_filterWhere method, but that has not solved the problem. In debugging it seems to be getting removed in the qualifyWhere function.
I tried debugging the menu app to see what happened there, and discovered that you have the same problem. The record_id='SYSTEM' in the $where clause is also being removed, effectively retrieving every record in the table. Fortunately, there aren't any different records in the table at the moment.
I can't figure out how to resolve this.
Graham
|
|
|