Strategy Question - Insertable Views

taubes

Member
Hi,

Is there a way to catch a SQL request before it is executed and change i.e. the insert into `table` statement.
I have views that are non-insertable because they contain important select( count(*) ... data. Therefore I would like to edit insert SQL-command and direct it to an insertable table. In the moment I am getting round this problem by changing the $_GET['tablename'] in custom_fucntions.php to a view without the extra data. This is however ugly as it requires an extra view for the insertion and breaks the flow coming back to the view after successful insertion. I tweaked this too adding the source view as a $_GET['master_table_name'] and making it an $_GET['is_items_table'] but this becomes very slow and feels like unnecessary hacking away.

The second question related to this is the items tables from a master-slave link are very slow it sometimes takes 10 sec to load the query, however if I load the items view directly it loads with normal speed.

Thanks so much,

Stefan
 
Top