Edit report at https://bugs.php.net/bug.php?id=30322&edit=1

 ID:                 30322
 Comment by:         jochem dot blok at fasterforward dot nl
 Reported by:        erik at xpand dot nl
 Summary:            mssql_fetch_field(result)->column_source same as
                     ->name
 Status:             Bogus
 Type:               Bug
 Package:            MSSQL related
 Operating System:   Windows Server 2003
 PHP Version:        5.0.2
 Block user comment: N
 Private report:     N

 New Comment:

The described result is the samen on Linux Debian. The driver (FreeTDS) is 
different then the Windows driver. Are you sure this is not a bug in PHP?

(Yes I have seen this bug is 8 years old ;))


Previous Comments:
------------------------------------------------------------------------
[2004-10-05 09:34:41] der...@php.net

No bug in PHP -> bogus.

------------------------------------------------------------------------
[2004-10-05 08:44:08] erik at xpand dot nl

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

------------------------------------------------------------------------
[2004-10-04 22:34:39] il...@php.net

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 https://bugs.php.net/bug.php?id=30322&edit=1

Reply via email to