Tema: Re: sql select salygoj yra masyvas
Autorius: Mindaugas J.
Data: 2009-02-19 12:39:30
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.

"dnt" <dsnt@hotmail.com> wrote in message news:gnjast$23i$1@trimpas.omnitel.net...
> $result_test=mysql_query("select id, name from lent1 where id NOT IN 
> (".implode(',', $check).")");
> 
> kantas wrote:
>> //yra sql uzklausa, kuri selectina selectina stulpeli
>> $result_check = mysql_query("select id2 from lent2 where date = '$date'");
>> $check = mysql_fetch_array($result_check);
>> //reiksmiu skaicius kiekviena karta skiriasi
>> 
>> //toliau yra kita uzklausa, is kurios reiketu ishmesti reiksmes gautas 
>> "$check'e"
>> $result_test=mysql_query("select id, name from lent1 where id != 
>> '$check'");
>> $test=mysql_fetch_array($result_test);
>> //atsakymas..
>> 
>> jeigu $check reiskme visa laika butu viena, tada viskas aisku, bet, kai 
>> jos yra kelios, ty $check yra masyvas, neismastau, kaip loopus prasukti 
>> teisingai.. o gal dar kazka praleidau...?