diff --git a/src/qrz/main.go b/src/qrz/main.go index a108724..060ec35 100644 --- a/src/qrz/main.go +++ b/src/qrz/main.go @@ -262,9 +262,9 @@ func ToSlice(qrz Qrz) (out []string) { type Qrz struct { ID int `db:"id" xorm:"pk autoincr"` QRZ string `db:"qrz" xorm:"index notnull"` - DMRID string `db:"dmrid" xorm:"notnull"` + DMRID string `db:"dmrid" xorm:"index notnull"` Name string `db:"name" xorm:"index notnull"` - Address string `db:"address" xorm:"notnull"` + Address string `db:"address" xorm:"index notnull"` City string `db:"city" xorm:"index notnull"` Zipcode string `db:"zipcode" xorm:"index varchar(5) notnull"` Dept string `db:"dept" xorm:"index notnull"` diff --git a/src/qrzws/main.go b/src/qrzws/main.go index 8001f11..a42b923 100644 --- a/src/qrzws/main.go +++ b/src/qrzws/main.go @@ -226,9 +226,9 @@ func SetSearchLike(config config.Config, qrzdt *QrzDatatableInput) (searchstmt s var searchstr string switch config.DbType { case "sqlite3": - searchstr = "%s LIKE '%%%s%%'" + searchstr = "%s LIKE '%s%%'" case "mysql": - searchstr = "%s LIKE '%%%s%%'" + searchstr = "%s LIKE '%s%%'" case "postgresql": searchstr = "%s ~* '%s'" default: