Select p.name
from tab_person p, tab_list l
where l.id_tab_list = 18
and ((l.id_person != 0 AND l.id_person = p.id_person)
or l.id_person = 0)
}
-----Original Message-----
From: franky [mailto:[EMAIL PROTECTED]]
Sent: 06 July 2001 19:35
To: LIste de Mysql
Subject: conditional AND
Hi
I want to make query like this
Select p.name
from tab_person p, tab_list l
where l.id_tab_list = 18
if (l.id_person != 0){
AND l.id_person = p.id_person
}
table person
id_person,name,tel
table list
id_list,id_person,title
how can i do?
--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
Franois Boucher
[EMAIL PROTECTED]
_______
_ ( hello... )
Q _/\ ______/
<I>
L
--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php