php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38682 on fields with "(100*FIELDNAME) AS NAME ibase_fetch_object doesnt return values
Submitted: 2006-09-01 17:54 UTC Modified: 2007-09-14 01:00 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: mojontp at gmx dot de Assigned:
Status: No Feedback Package: InterBase related
PHP Version: 5.1.6 OS: WINDOWS XP
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mojontp at gmx dot de
New email:
PHP Version: OS:

 

 [2006-09-01 17:54 UTC] 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
.....


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-09-06 11:14 UTC] jani@php.net
Does this happen with PHP 5.2.4? If it does, update the version field accordingly.
 [2007-09-14 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 11:01:30 2024 UTC