tableInfo: tablename is empty string when using db function
| From: | James Hughes | Date: | Mon, 05 Jul 2004 20:55:09 +0000 |
| Subject: | tableInfo: tablename is empty string when using db function | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-13498@lists.php.net to get a copy of this message | ||
Hi,
I'm (actually, sql2xml) is using tableInfo to get result metadata on a
query:
SELECT CONCAT(party.first_name, ' ', party.last_name) as name,
organization, role.name as roles, party.active as active_status
FROM party, role, party_role
WHERE party.id = party_role.party_id
AND party_role.role_id = role.id
The CONCAT that generates the first field somehow causes tableInfo to give
the table name for that field as "", instead of "party". This royally
screws sql2xml, as you might expect. I'm sure it's the CONCAT that's
causing trouble, as I tried it without and got the expected results.
Is this a bug, or is tableInfo just not usable when there's a db function
in the query?
Anyone know of any workarounds?
Thanks,
James