Re: Re: Newbie: odbc_prepare & parameters
| From: | Michael J. Eisner | Date: | Fri, 19 Oct 2001 11:24:11 +0000 |
| Subject: | Re: Re: Newbie: odbc_prepare & parameters | ||
| References: | 1 2 3 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-13530@lists.php.net to get a copy of this message | ||
Hi Andreas,
the problem is that not every row of the $ergRouten statement has a row in
the $ergDispatch statement.
I also tired a UNION query, but this took longer for execution than it does
now and brings me more timeout problems then I have now.
Michael
"Andreas Karajannis" <karajannis@mediaworx.com> schrieb im Newsbeitrag
news:3BD009BC.4000109@mediaworx.com...
> Michael J. Eisner wrote:
>
>
> >>>i have a loop going through a result set of an odbc-query. each row of
> >>>this loop has to be checked if there is an entry in another table. so
as the
> >>>last odbc-query is the same for each row except they key-field, i tried
to
> >>>use the odbc_prepare function and a parameter array. but it doesn't
work.
>
> If Access supports subqueries, you should consider this approach, e.g.
>
>
> $sql="SELECT fldCaptain, fldCaptID, fldCaptStat, fldCaptTR, fldCaptDuty,
> fldFO, fldFOID, fldFOStat, fldFOTR, fldFODuty, fld_F_Reserved,
> fld_F_Flown
> FROM tblBookings WHERE fldFlight in (select ... from ... where ...)
> AND fldBookDate=#".$EngDatum."#";
>
> with the subquery being essentially your $ergRouten statement.
>
>
> HTH,
> Andreas
>
> --
> Andreas Karajannis
> mediaworx berlin AG
>
> Fon (0 30) 2 75 80 - 266
> Fax (0 30) 2 75 80 - 200
>