SQL select
| From: | Jiří Němec | Date: | Thu, 10 Jul 2003 08:23:31 +0000 |
| Subject: | SQL select | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-154688@lists.php.net to get a copy of this message | ||
hello,
i have got a problem with SQL select:
I have got a table such this:
id_k typ name id
1 f bla1 1
2 f bla2 1
2 i bla3 1
3 z bla4 1
3 f bla5 1
4 i bla6 1
4 z bla7 1
5 z bla8 1
and id = 1 and I need select these rows:
id_k typ nazev id
1 f bla1 1
2 f bla2 1
3 f bla5 1
4 i bla6 1
so, when doesn'i exist component (id_k = component) type "f" so I want
component with type "i", but when doesn't exist type "f" noir "i"
I
don't want to select row with type "z".
jiri nemec, ICQ: 114651500
www.menea.cz - www stránky a aplikace