|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2007-05-17 13:25 UTC] fabrizio dot balliano at crealabs dot it
Description: ------------ if you run a query with joins is really useful to have the getcolumnmeta to return the table name thus I can understand from the resultset with field come from every table now it's possible to do that with http://it.php.net/manual/it/function.mysql-tablename.php PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 23:00:01 2025 UTC |
<?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); } ?>