|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-09-06 11:14 UTC] jani@php.net
[2007-09-14 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 03:00:01 2025 UTC |
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 .....