#30322 [Opn->Bgs]: mssql_fetch_field(result)->column_source same as ->name
| From: | iliaa@php.net | Date: | Mon, 04 Oct 2004 20:34:42 +0000 |
| Subject: | #30322 [Opn->Bgs]: mssql_fetch_field(result)->column_source same as ->name | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-67108@lists.php.net to get a copy of this message | ||
ID: 30322
Updated by: iliaa@php.net
Reported By: erik at xpand dot nl
-Status: Open
+Status: Bogus
Bug Type: MSSQL related
Operating System: Windows Server 2003
PHP Version: 5.0.2
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions.
Thank you for your interest in PHP.
The data you are seeing is returned directly from mssql library without
any modifications. So, the bug (valid bug btw) is not a PHP one, but a
bug in the mssql library you are using.
Previous Comments:
------------------------------------------------------------------------
[2004-10-04 16:22:18] erik at xpand dot nl
Description:
------------
I executed this query with 2 columns which have the same name:
SELECT tbl1.n_MatchID, tbl2.n_MatchID FROM tbl1,tbl2 WHERE (etc)
When I request the fields, the column_source and the name are the
same...
Reproduce code:
---------------
$query = "SELECT Infostrada.tFootballMatch.n_MatchID as a,
Infostrada.tFootballMatchDetail.n_MatchID as b FROM
Infostrada.tFootballMatchDetail, Infostrada.tFootballMatch WHERE
Infostrada.tFootballMatch.n_MatchID =
Infostrada.tFootballMatchDetail.n_MatchID";
$result = mssql_query($query) or die();
while($obj = mssql_fetch_field($result)) {
echo $obj->column_source . "." . $obj->name . "<br>";
}
Expected result:
----------------
tFootballMatch.n_MatchID<br>
tFootballMatchDetail.n_MatchID<br>
($obj->column_source.$obj->name)
Actual result:
--------------
n_MatchID.n_MatchID<br>
n_MatchID.n_MatchID<br>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30322&edit=1