|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-04-28 03:59 UTC] arnaud@php.net
[2003-05-04 11:40 UTC] lsmith@php.net
[2003-05-05 08:15 UTC] lsmith@php.net
[2003-05-05 10:22 UTC] marc at links2linux dot de
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 01:00:01 2025 UTC |
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