- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
switch(field) {
case 0:
filter = "a.opros_opros like '%'";
break;
case 1:
filter = "a.opros_opros like '" + param[0] + "'";
break;
case 2:
filter = "a.opros_name like '" + param[1] + "'";
break;
case 3:
filter = "a.opros_opros like '" + param[0] + "' and a.opros_name like '" + param[1] + "'";
break;
}
String sql = <blah-blah-blah> + filter+ <blah-blah-blah>;
3.14159265 25.05.2011 10:36 # +1
подобная инициализация String filter = null;
и отстутствие default добавляют коду пикантности
Lure Of Chaos 25.05.2011 15:43 # 0
Lure Of Chaos 25.05.2011 15:44 # 0
absolut 25.05.2011 15:59 # 0
Lure Of Chaos 25.05.2011 16:03 # 0
absolut 25.05.2011 16:08 # 0
Lure Of Chaos 25.05.2011 16:12 # +1
absolut 25.05.2011 16:26 # 0
Lure Of Chaos 25.05.2011 16:29 # 0
absolut 25.05.2011 16:53 # 0
guest8 09.04.2019 17:59 # −999