I'm sorry for multiple threads.
This subject was total misunderstanding by me.
The thing that was confusing me was that if I don't
enter a search term into the search field then it would not return
that record even if some of the fields match.
The right way is a dynamic query like this:
(sql (:se
Good to see you figured it out!
(As an aside, please try to actually reply to your thread, rather than
starting a new one for each mail. I'm not sure what you did wrong, but
both gmail and the mailing list archive show this conversation as four
different threads.)
I got it. I have to :or it with :is-null, like this:
(sql (:select '* :from 'table :where
(:or (:like 'field "%something%") (:is-null 'field
___
postmodern-devel mailing list
postmodern-devel@common-lisp.net
http://common-lisp.net/cgi-bin/mailm
I know what are you talking about, I read the Practical Common Lisp, I'm
reading On lisp now
but I didn't read all the Postmodern docs.
(I know now what :raw does)
What I really want is when the field is null to return true.
(:is-null 'field) and what now ?
Is there an expression "true" in sql ?
I
On 29 January 2011 04:15, Haris wrote:
> I made query like this:
>
> (sql (:select '* :from 'kupci :where (:and
> (:raw (if 'ime (sql (:like 'ime (concat-string "%" (parameter "ime") "%")))
> t))
What exactly do you think (if 'symbol ) is doing? Why?
> (:raw (if 'prezime (sql (:like 'prezime
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 '
You could make that part of the query dynamic, like this:
(sql (:select '* :from 'kupci :where (:and (:raw (if TEST (sql (:like
'ime (concat-string "%" (parameter "ime") "%"))) t))
(:raw (if
TEST2 (sql (:like 'prezime (concat-string "%" (pa
Hi.
I made a query like this:
(sql (:select '* :from 'kupci :where (:and
(:like 'ime
(concat-string "%" (parameter "ime") "%"))
(:like 'prezime
(concat-string "%" (parameter "prezim