Another question from newbie. Actually I have working solution already in my hands but I’m just double checking this because Yii is soo automated .
So, I have listbox which data comes from anothel Model. Table structure is ID and ITEM. So every item has unique ID. Now I’d like to insert ID to another table, it depends what user chooses right? My code:
If i am not mistaken you have to two tables which relate to each other if that is the the case simple relationship one-to-many in this case would be better option Yii does this out of the box what you have done please do take look at the guide
When I’m trying to submit the form without previous code I posted I get SQL syntax error which is quite obvious because it needs integer instead of string. Perhaps my view code is bad?