ID:               30322
 User updated by:  erik at xpand dot nl
 Reported By:      erik at xpand dot nl
-Status:           Bogus
+Status:           Closed
 Bug Type:         MSSQL related
 Operating System: Windows Server 2003
 PHP Version:      5.0.2
 New Comment:

It wasn't a support request. I was sure it is a bug, but I didn't
realize it could be a bug in the mssql-lib.

Thanks for your reply


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

[2004-10-04 22:34:39] [EMAIL PROTECTED]

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.

------------------------------------------------------------------------

[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

Reply via email to