[postmodern-devel] query

Haris fbogdanovic at xnet.hr
Sat Jan 29 12:15:30 UTC 2011


I made query like this:

(sql (:select '* :from 'kupci :where (:and
(:raw (if 'ime (sql (:like 'ime (concat-string "%" (parameter "ime") "%"))) 
t))
(:raw (if 'prezime (sql (:like 'prezime (concat-string "%" (parameter 
"prezime") %"))) t)))))

but it doesn't work.
For example, if (:like ...) for 'ime field passes and 'prezime field is 
null,
record will not be selected.
Is the test (if 'prezime ...) ok to test that the field is not null ?
Or do I have to do something like (if (/= 'prezime nil) ...) ? 





More information about the postmodern-devel mailing list