Hi all !!!!
I have a curious problem with a small PHP program. If this program work
with MySQL, its everything ok. If it works with DB/2 Connect for Linux/390,
and the connect access a DB/2 for VM/ESA 7.1, I become
jeroglifics.
To resume:

PHP --> MySQL , OK.
PHP --> DB2 Connect --> DB2 VM - Problem !

The small programm make two selects, the second select its donde against
the results of the first one, and this fails in the situation of db/2 connect.

Example:

Customer 1
    User 1
    User 2
    User 3

Customer 2
    User 1
    User 2
    User 3

Instead, I become:

Customer 1
    User 1
    User 2
    User 3
(Jeroglifics )
End.

The Program looks like :


<HTML>
         <BODY>
                 <?php
                         require "db2.php";
                         $dbid = odbc_connect($dbname,$dbuser,$dbpass);
                         //      print odbc_errormsg($dbid);

                         $sqlString = "SELECT pzdkdnr,pzdabnr,pzdprog FROM
sqluser.platzdat WHERE pzdkdnr=$kdNr ORDER BY pzdprog,pzdabnr";
                         print $sqlString ."<BR>";
                         $result = odbc_exec($dbid,$sqlString);
                         $colCount = odbc_num_rows($result);
                         print $colCount;
                         print "<TABLE BORDER=1>\n";
                         while(odbc_fetch_row($result)!=FALSE) {
                                 $kdNr = odbc_result($result,"pzdkdnr");
                                 $abNr = odbc_result($result,"pzdabnr");
                                 $prog = odbc_result($result,"pzdprog");
                                 $sqlString1 = "SELECT benName from
sqluser.benutzer WHERE benKennung<20";
                                 $result1 = odbc_exec($dbid,$sqlString1);
                                 print
"<TR><TD>$abNr</TD><TD>$prog</TD><TD>$sqlString1</TD><TD>\n";
                                 print odbc_result_all($result1);
                                 print "</TD></TR>\n";
                         }
                         odbc_free_result($result);
                         print "</TABLE>";
                         odbc_close($dbid);
                 ?>
         </BODY>
</HTML>

Any help is welcomed!!!
Thanks,
Rodolfo.

Reply via email to