Hi,
I’m new to this forum and yii framework. I know this is very basic but I don’t seem to understand how this should work. Point me to a thread that answers this is okay by me.
Database with a relationship, logging – should have an existing id in loggers.
When I create a logging record and input an ID that is not present in loggers, a CDbException is displayed. How do I prevent this and just inform the logger that the id is non-existent…
Also it would help if I know which methods are involved and what do I need to put in each method to make this work.
Thanks,
CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails