#41416 [Opn->Csd]: getColumnMeta() should also return table name

From: Date: Thu, 17 May 2007 15:12:35 +0000
Subject: #41416 [Opn->Csd]: getColumnMeta() should also return table name
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-112748@lists.php.net to get a copy of this message
ID: 41416 Updated by: tony2001@php.net Reported By: fabrizio dot balliano at crealabs dot it -Status: Open +Status: Closed Bug Type: Feature/Change Request PHP Version: 5.2.2 New Comment: This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2007-05-17 15:03:42] fabrizio dot balliano at crealabs dot it <?php $select = $DB->query('SELECT * FROM table1 JOIN table2 ON (table1.id = table2.id)'); $colcount = $select->columnCount(); for ($i=0; $i<$colcount; $i++) { $meta = $select->getColumnMeta(0); var_dump($meta); } ?> ------------------------------------------------------------------------ [2007-05-17 14:58:16] tony2001@php.net Then please create one, I'll look into the feature request after that. ------------------------------------------------------------------------ [2007-05-17 14:29:26] fabrizio dot balliano at crealabs dot it actually i don't have a test script... just run something like select * from table1 join table2 on (table1.id=table2.id) the resultset wouldn't allow me to know with field come from table1 or table2, thus you call eg: getcolumnmeta(5) and you should also get table_name=>table1 or table2 or whatever ------------------------------------------------------------------------ [2007-05-17 14:23:22] tony2001@php.net I'm going to look into it and I would like to have a test script handy. I guess you already have one, please provide it, so that I wouldn't have to spend time on it. Thank you. ------------------------------------------------------------------------ [2007-05-17 14:16:37] fabrizio dot balliano at crealabs dot it there's no need for test scripts, point just is that calling getColumnMeta() should return the table name of the column ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/41416 -- Edit this bug report at http://bugs.php.net/?id=41416&edit=1

« previous php.bugs (#112748) next »