|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-10-26 20:51 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 06:00:01 2025 UTC |
Description: ------------ Can anyone else confirm that this function (mysql_field_table()) does NOT work with a mysql query using a UNION in the query? Reproduce code: --------------- <?php //connect to db $sql = "(SELECT id, first_name, last_name FROM employees) UNION ALL (SELECT id, first_name, last_name FROM inactive_employees) ORDER BY last_name ASC"; $result = mysql_query($sql) or die(mysql_error()); while($row = mysql_fetch_assoc($result)) { echo "Table: " . mysql_field_table($result, 0); echo "Field: " . mysql_field_name($result, 0); echo "Value: " . $row['id']; } ?>