From:             mojontp at gmx dot de
Operating system: WINDOWS XP
PHP version:      5.1.6
PHP Bug Type:     InterBase related
Bug description:  on fields with "(100*FIELDNAME) AS NAME ibase_fetch_object 
doesnt return values

Description:
------------
queries like
"SELECT FIELD1, ...FIELD_i FROM
TABLENAME WHERE..." 
are ok.
but:

SELECT FIELD1, 
(SELECT SUM(XYZ) FROM TABLE2 WHERE FIELD=T1.NAME) AS VIRTNAME,
FIELD_i
FROM TABLE1 T1
WHERE...

leads to an error:
Fatal error: Cannot access empty property
in 
[PHP]
first:
$this->result=ibase_query($this->sqlQuery);

while($k<$numFields)
                                        {
                                                
$feldinfo=ibase_field_info($this->result,$k);
                                                $colNames[]=$feldinfo['name'];
                                                $k++;
                                        }
then:

$datensatz = ibase_fetch_object($this->result);
$row[$colNames[$i]]=
$datensatz->$colNames[$i];<<----there

a direct access leads as well to an error:
$datensatz->VIRTNAME....

i hope its not too much text...




Reproduce code:
---------------
you can get the class in detail from
http://pilaf.ath.cx/pub/upload/upload/class_IBtable.txt


Actual result:
--------------
print_r(ibase_field_info($this->result,$k))--->
Array ( [0] => [name] => [1] => [alias] => [2] => [relation] => [3] => 8
[length] => 8 [4] => NUMERIC(18,2) [type] => NUMERIC(18,2) ) felder:1
.....


-- 
Edit bug report at http://bugs.php.net/?id=38682&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=38682&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=38682&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=38682&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=38682&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=38682&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=38682&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=38682&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=38682&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=38682&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=38682&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=38682&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=38682&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=38682&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=38682&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=38682&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=38682&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=38682&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=38682&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=38682&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=38682&r=mysqlcfg

Reply via email to