Tema: Re: sql select salygoj yra masyvas
Autorius: kantas
Data: 2009-02-19 19:26:44
nelabai gavosi su tavo siulytu variantu. bet turiu kita solutiona, kuris 
atrodo mazdaug taip:
select id, name from lent1 where not exists (select id2 from lent2 where 
lent1.id = lent2.id2 and lent2.date = $date)

thnx

On Thu, 19 Feb 2009 12:40:37 +0200, Mindaugas J. wrote:

> wtf.... ?
> 
> SELECT lent1.id,
>     lent1.name
> FROM lent1
>     LEFT JOIN lent2 ON lent1.id = lent.id2
> WHERE lent2.date = '$date'
>     AND lent2.id2 IS NULL
> 
> -Mindaugas J.
>