php3-list | 2000051
Date: 05/15/00
- Next message: Vamsi Nath: "[PHP3] Accessing global variables from within a class"
- Previous message: Markus Harma: "RE: [PHP3] Internationalization schemes"
- In reply to: systems: "[PHP3] odbc behaviour (was odbc_result getting same row)"
- Next in thread: Gibellini Paolo: "[PHP3] R: [PHP3] odbc behaviour (was odbc_result getting same row)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi Gordon,
The recommended method is --with-openlink or --with-iodbc, not both (not
that it really should matter here). Use --with-iodbc only if you have
non-openlink ODBC drivers you want to use, or are compiling an ODBC
compliant application on your platform.
Also, the LD_LIBRARY_PATH environment variable will determine which driver
manager you are using. Once you have clarified it (I would just
recompile --with-openlink) then you can produce an ODBC trace by putting the
following lines in your odbc.ini file:
[UDBC]
DebugFile=/tmp/debug.out
The debug.out file should show the ODBC calls being passed through by the
odbc_exec and odbc_result_all function. By comparing that to a trace on the
successful odbctest select statement, we can figure out where the problem is
occuring.
Best regards,
Andrew
-----Original Message-----
From: systems [mailto:systems <email protected>]
Sent: Monday, May 15, 2000 9:21 AM
To: php3 <email protected>
Subject: [PHP3] odbc behaviour (was odbc_result getting same row)
Hi, last week I posted a please for help with failing 'odbc_result' ...
>From experiments done on Friday and today, I think the odbc_result thing was
some kind of red herring. In trying suggestions from a couple of folks on
this list, I found that there was something a bit more fundamental going on.
ok, here's some really simple code:
<?php
$id = odbc_connect("DSN=crime_no;UID=ingres;PWD=XXX","","");
$res = odbc_exec("$id, "select pfid, fiscallocation from pf_fiscal");
$x = odbc_result_all($res);
?>
- that works; it looks ok, all 14 rows in the table are printed.
->
pfid fiscallocation
AB CrownOffice
DI Dingwall (etc etc)
Now, I change the exec to this:
$res = odbc_exec("$id, "select pfid from pf_fiscal");
- what do I get now? - "No rows found" !!!!
- the *only* change I made to the code was to remove the column from the
select.
- I've tried various combinations of columns (select * was ok, select pfid
was ok...,
select eaddress, pfid -no rows...)
Has anyone come across something like this? Am I doing something really
stupid?
(BTW, that table above has only 3 columns; none are nullable; none is larger
than 250 chars.)
(I could have sent this out on Friday afternoon, but thought I'd wait - just
in case I was really going crazy!...)
help <;-( ..
[Context: PHP 3.0.15; Apache 1.3.9; Linux (Red Hat 6.1); PHP running as
Apache module, compiled --with-iodbc --with-openlink. RDBMS is Ingres 6.4
on Unix (svr4)]
gordon gallacher
inverness
PS The openlink-provided 'odbctest' program running at the Linux prompt
gives the correct result set for all the queries above.
-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribe <email protected> To subscribe to the digest, e-mail: php3-digest-subscribe <email protected> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-admin <email protected>-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribe <email protected> To subscribe to the digest, e-mail: php3-digest-subscribe <email protected> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Vamsi Nath: "[PHP3] Accessing global variables from within a class"
- Previous message: Markus Harma: "RE: [PHP3] Internationalization schemes"
- In reply to: systems: "[PHP3] odbc behaviour (was odbc_result getting same row)"
- Next in thread: Gibellini Paolo: "[PHP3] R: [PHP3] odbc behaviour (was odbc_result getting same row)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

