|
Posted by Hilarion on 11/28/05 14:01
> When I have an Sql statement of the form:
>
> SELECT LOC_ID,REPEAT('--',LEVELX)||NAMEX
> FROM is3.locations
> WHERE entity_id=2
> AND (inactive='N' OR inactive IS NULL)
> AND leftx BETWEEN 2 AND 983
> ORDER BY LEFTX
>
> odbc_num_rows returns -1. When I change the sql statement to:
>
> SELECT LOC_ID,CHAR(LEVELX)||' '||NAMEX
> FROM is3.locations
> WHERE entity_id=2
> AND (inactive='N' OR inactive IS NULL)
> AND leftx BETWEEN 2 AND 983
> ORDER BY LEFTX
>
> odbc_num_rows returns the correct result.
>
> Both statements work in the ADS development environment.
>
> The rdms is db2 udb v8.1.9 linux
>
> php is 4.4.0 with db2 compiled in
> './configure' '--prefix=/usr/local/php-4.4.0'
> '--with-apxs2=/usr/local/apache2.0.54/bin/apxs'
> '--with-ibm-db2=/db2home/db2inst1/sqllib'
> '--with-openssl=/usr/local/ssl-0.9.8'
Maybe it's a problem with "--" being a comment combination.
Try using one "-" instead of two, or concatenate them.
Hilarion
Navigation:
[Reply to this message]
|