List:General Discussion« Previous MessageNext Message »
From:Thomas Booms EDV Date:April 14 1999 2:40pm
Subject:Problem with query
View as plain text  
Hi all,

we have this query that doesn't run. It seems, that it is not possible
to work with subqueries.

If subqueries are running, what do we make wrong? Or, what do we have to

The problem is at "and zielflug in (select...".

Thanks for your help in advance!


        $res=mysql_query ("select distinct date_format(abflugdatum,
'%d.%m.%y'),date_format(rueckreisedatum,'%d.%m.%y'),verpflegung, min(preis) as low
,hotelname,hotelort,sterne, hotelcode,dauer from $Start where to_days(abflugdatum)
>=to_days(concat(right('$datum',2),mid('$datum',4,2),left('$datum',2))) and
<=(to_days(concat(right('$datum',2),mid('$datum',4,2),left('$datum',2)))+'$plus') and
zielflug in (select distinct kurz from zielregion where land='$Zielregion') and sterne
>= '$kategorie' and preis <= '$Preis' and dauer >= ('$dauer' - '$dplus') and
dauer <= ('$dauer' + '$dplus') and belegung='$unterbringung' and
verpflegung='$verpflegung' group by abflugdatum, rueckreisedatum, hotelname, hotelort
order by low");
Problem with queryThomas Booms EDV14 Apr
  • Re: Problem with queryEd Carp14 Apr