#22204 [Opn->Asn]: DB tableInfo(): table set where it should not be

From: Date: Mon, 28 Apr 2003 08:59:32 +0000
Subject: #22204 [Opn->Asn]: DB tableInfo(): table set where it should not be
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-15663@lists.php.net to get a copy of this message
ID: 22204 Updated by: arnaud@php.net Reported By: marc at links2linux dot de -Status: Open +Status: Assigned Bug Type: PEAR related Operating System: Linux PHP Version: 4.2.3 Assigned To: lsmith New Comment: changing status Previous Comments: ------------------------------------------------------------------------ [2003-02-13 07:04:35] marc at links2linux dot de Hi! I use the PEAR DB tableInfo() funtion to get information about table fields (mysql). if you say "SELECT id FROM table1 ..." then the table attribute for id is set to "table1". Thats correct because I can use "table1.id" to refer to that field in a WHERE clause for example. If I use something like SELECT CONCAT(anschr_1, ' - ', IFNULL(anschr_2,''), ' - ', IFNULL(anschr_3,'')) AS customer_name FROM table1 then the table attribute is *not* set. That very OK because the field table1.customer_name does not exist. Now the problem: If I say "SELECT table1.id AS id2 ,table2.foo FROM table1, table2 ..." then the "table" attribute of "id2" in tableInfo() is set to "table1" which is IMHO *not* OK because table1.id2 is not a valid field. I hope It's clear what I am pointing to... -Marc ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=22204&edit=1

« previous php.pear.dev (#15663) next »