ID:               38682
 Updated by:       [EMAIL PROTECTED]
 Reported By:      mojontp at gmx dot de
 Status:           Open
 Bug Type:         InterBase related
 Operating System: WINDOWS XP
 PHP Version:      5.1.6
 New Comment:

Does this happen with PHP 5.2.4? If it does, update the version field
accordingly.


Previous Comments:
------------------------------------------------------------------------

[2006-09-01 17:54:55] mojontp at gmx dot de

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 this bug report at http://bugs.php.net/?id=38682&edit=1

Reply via email to