|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-10-04 22:34 UTC] iliaa@php.net
[2004-10-05 08:44 UTC] erik at xpand dot nl
[2004-10-05 09:34 UTC] derick@php.net
[2012-01-04 08:25 UTC] jochem dot blok at fasterforward dot nl
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 20:00:01 2025 UTC |
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>