摘要:
1.mysql 的replace 批量替换update candidate set education = replace(education,'科','学') where education like '%科%';把数据中出现"科"的都替换为"学"。2. mysql 的replace into sql="replace into score (quest_id,jdg_id,cd_id,score) values ('"+ questionId+"',' 阅读全文
摘要:
今天碰到一个很有意思的问题,就是需要用Struts 2的iterator标签来遍历一个含有双层List的嵌套。首先我们从最基础的说起,用iterator标签遍历一个List。如果Action中有一个这样的不为null的属性:private List list; 那么在JSP中,就可以这样来遍历list: 其中的propertyNameOfObjectInList是指list中对象的属性名。下面我们再来看稍微复杂一点的情况,那就是嵌套使用iterator标签。假设我们的Action中有如下属性:private List list1; private List list2;... 阅读全文