Bug #8009 Updated: mysql_fetch_array and same Column Name
| From: | jimw@php.net | Date: | Sat, 27 Apr 2002 18:09:08 +0000 |
| Subject: | Bug #8009 Updated: mysql_fetch_array and same Column Name | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-6252@lists.php.net to get a copy of this message | ||
ID: 8009
Updated by: jimw@php.net
Reported By: hochstein@macron-ag.de
-Status: Open
+Status: Closed
Bug Type: Feature/Change Request
Operating System: All
PHP Version: 4.0.3pl1
New Comment:
mysql_fetch_array() just uses the names reported by the mysql client
library. use 'SELECT table.fieldname AS name' to given them different
names.
Previous Comments:
------------------------------------------------------------------------
[2000-11-28 07:17:57] hochstein@macron-ag.de
In the documentation it is said that if you use same column names the
last one will win. That is so far ok.
However I think the following statement could be correctly transferred
in an assoc. array:
SELECT tblOrderAddress.Street, tblDeliveryAdress.Street
FROM tblCustomer AS tblOrderAddress, tblCustomer AS tblDeliveryAddress
WHERE .....;
It is correct that Street occurs twice as an attribute, but it is
distinguishable by the preceding tablename.
Isn't it possible to change mysql_fetch_array, so that tablenames, if
stated, are included in the assoc Array building process?
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=8009&edit=1