|
@@ -103,7 +103,9 @@ func (r *SQLVal) AndLikes(fieldName string, param ...string) {
|
|
|
func (r *SQLVal) AndLikes2(fieldName string, fieldName2 string, param ...string) {
|
|
func (r *SQLVal) AndLikes2(fieldName string, fieldName2 string, param ...string) {
|
|
|
if len(param) > 0 {
|
|
if len(param) > 0 {
|
|
|
for _, val := range param {
|
|
for _, val := range param {
|
|
|
- *r += SQLVal(fmt.Sprintf(" and (%v like '%%%v%%' or %v like '%%%v%%')", fieldName, val, fieldName2, val))
|
|
|
|
|
|
|
+ if len(val) > 0 {
|
|
|
|
|
+ *r += SQLVal(fmt.Sprintf(" and (%v like '%%%v%%' or %v like '%%%v%%')", fieldName, val, fieldName2, val))
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|