A strange problem is that when we look into the database, there is only one less value, and there is diversity information in the TV, I want to import the new sub-drama content to the database through the introduced Data $ info. during insertion, I interpret it like this. The key value corresponding to $ info is equal to the number of TV sets. If they are equal, the corresponding content is inserted into the diversity field (s_description). The problem arises: During each insertion, the first episode of TV series cannot be inserted. The content of other sets is consistent with the number of sets. when you query the database, there is one less value.
Yes. there is diversity information in the TV. I want to import the new sub-drama content to the database through the introduced Data $ info,
This is how I interpret the data during insertion.
The key value corresponding to $ info is equal to the number of TV sets. If they are equal, the corresponding content is inserted into the diversity field (s_description ).
The problem arises:
During each insertion, the first episode of TV series cannot be inserted.
The content of other sets is consistent with the number of sets.
My code is like this.
PHP code
While (list ($ key, $ value) = each ($ rs) {// $ rs is the TV series diversity array in the database echo $ value ['s _ num']; foreach ($ info as $ keys =>$ v) {// $ info is an array of diversity content. Echo $ keys ."
"; If ($ value ['s _ num'] = $ keys) {// $ value ['s _ num'] indicates the number of sets. $ option ['table'] = $ this-> module-> getTableName ('Ms _ series_info '); $ option ['data'] ['s _ description'] = $ v; $ option ['where'] [] ='s _ num = '. $ keys; $ option ['where'] [] ='s _ id = '. $ id; $ s = $ this-> module-> update ($ option); if ($ s) {break; }}$ option = '';}}
Note: the initial key value of $ info is 0. I processed it. $ Info corresponds to the initial key word 1 (the processing method is to use the number of sets $ num to correspond to the number of sets $ content .), As the first episode,
Are there any such phenomena?
------ Solution --------------------
Dare not speak with data... The description is too abstract.
------ Solution --------------------
I don't know what framework you are using. print each SQL statement and check it.