Re: [PHP-DB] Re: Newbie: odbc_prepare parameters

2001-10-19 Thread Michael J. Eisner

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 [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 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




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Re: Newbie: odbc_prepare parameters

2001-10-19 Thread Michael J. Eisner

Hi Andreas,

what I forgot: the queries connect both to different databases, so they use
a different connection.

Michael


Andreas Karajannis [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 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




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] Re: Newbie: odbc_prepare parameters

2001-10-19 Thread Andrew Hill

Hmm!  Sometimes tracing needs to be turned off and then back on.  The driver
manager in Windows can be buggy.
Also, select some drive level file to be safe, like c:/sql.log

Best regards,
Andrew Hill
Director of Technology Evangelism
OpenLink Software  http://www.openlinksw.com
Universal Data Access  Data Integration Technology Providers

 -Original Message-
 From: Michael J. Eisner [mailto:[EMAIL PROTECTED]]
 Sent: Friday, October 19, 2001 6:27 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP-DB] Re: Newbie: odbc_prepare  parameters


 Andrew,

 you mean to activate the ODBC-Tracing of the OperatingSystem? When I
 activate this, nothing is being logged.

 OS is WIN2000 Prof.
 Database: ACCESS 2000
 Diver: normal MS ODBC-Driver of WIN2000

 Michael



 Andrew Hill [EMAIL PROTECTED] schrieb im Newsbeitrag
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Michael,
 
  Have you generated an ODBC trace?
  You can see what values are being passed into ODBC and where
 the error is
  occurring.
 
  Also, knowing what driver/database/platform would help :)
 
  Best regards,
  Andrew Hill
  Director of Technology Evangelism
  OpenLink Software  http://www.openlinksw.com
  Universal Data Access  Data Integration Technology Providers
  office:781.273.0900 x 27 mobile:781.608.4217
 
   -Original Message-
   From: Michael J. Eisner [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, October 18, 2001 1:53 PM
   To: [EMAIL PROTECTED]
   Subject: [PHP-DB] Re: Newbie: odbc_prepare  parameters
  
  
   Hi all,
  
   sorry, there was a mistake:
  
$sql=SELECT fldCaptain, fldCaptID, fldCaptStat, fldCaptTR,
 fldCaptDuty,
fldFO, fldFOID, fldFOStat, fldFOTR, fldFODuty, fld_F_Reserved,
   fld_F_Flown
FROM tblBookings WHERE fldFlight = '?' AND fldBookDate
   =#.$EngDatum.#;
  
   should read
  
   FROM tblBookings WHERE fldFlight = ? AND fldBookDate
 =#.$EngDatum.#;
 ^^
   there should the parameter be used.
  
   Michael Eisner
  
  
   Michael J. Eisner [EMAIL PROTECTED] schrieb im Newsbeitrag
   [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi all,
i'm really new in php (working on my first project9 and i got the
   following
situation:
   
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.
I got no errormessages.
   
this is how it looks like - and doesn't work:
**
...
...
$sql=SELECT fldCaptain, fldCaptID, fldCaptStat, fldCaptTR,
 fldCaptDuty,
fldFO, fldFOID, fldFOStat, fldFOTR, fldFODuty, fld_F_Reserved,
   fld_F_Flown
FROM tblBookings WHERE fldFlight = '?' AND fldBookDate
   =#.$EngDatum.#;
   
$ergDispatch=odbc_prepare($conDispatch,$sql);
   
While (odbc_fetch_into($ergRouten, $datRouten))
...
...
$Para = array($datRouten[0]);
odbc_execute($ergDispatch,$Para);
...
...
*
The array is filled correctly, but the odbc_execute
 function doesNn't
   bring
back any value, but there are definitvly rows where there
 should be a
result.
   
Thanks in advance!
   
Michael J. Eisner
   
   
   
  
  
  
   --
   PHP Database Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail:
 [EMAIL PROTECTED]
  
  
  
 
 



 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]






-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]