292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
|
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
|
-
+
|
(string-intersperse remfields ","))))
(list keystr header)))
;; make a query (fieldname like 'patt1' OR fieldname
(define (db:patt->like fieldname pattstr #!key (comparator " OR "))
(let ((patts (if (string? pattstr)
(string-split pattstr ",")
'(""))))
'("%"))))
(string-intersperse (map (lambda (patt)
(conc fieldname " LIKE '" patt "'"))
(if (null? patts)
'("")
patts))
comparator)))
|