November 1st, 2012, 12:18 AM
How to update a view?
Hi my site was developing using drupal6 and db is PostgreSQL 8.3.8 on x86_64-pc-linux-gnu, compiled by GCC gcc-4.4.real (Ubuntu 4.4.1-3ubuntu3) 4.4.1
My problem is when i update a record it shows a failed error,is there any mistake in my query,and the query was
UPDATE uac_institution_view SET status = '2' WHERE nid = '9950'
and the error is:
failed : ERROR: infinite recursion detected in rules for relation "uac_institution_view"
i am new in this db can any one help me how to update a view.
November 8th, 2012, 10:48 PM
A VIEW monitor the result of an SQL statement in a table, they are read only.
I would suggest to update the main source table of the view.
Hope this gives you an idea.
November 9th, 2012, 02:23 AM
So you have a RULE defined for that view which tries to update the underlying table. And that's where the error arises.
Originally Posted by bsrbvr
You have to show us the code of those rules, otherwise nobody will be able to help you.
That's plain wrong.
Originally Posted by rtz_andy
I will not read nor answer questions where the SQL code is messy and not formatted properly using [code] tags.
Tips on how to ask better questions: