<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<? include "connect.php"; ?>
<?
$strSQL = "SELECT a.id_tb_tv,b.id_tb,b.tb_name,b.descrition_table,c.id_view,c.view_names,e.id_field,e.field_name,e.description_field,d.id_tb_tf FROM table_view a LEFT JOIN (table_name b,view_name c) on (a.id_tb=b.id_tb and a.id_view=c.id_view) LEFT JOIN table_field d on (d.id_tb=b.id_tb ) LEFT JOIN field_name e on (d.id_field = e.id_field) ";
/* $strSQL = "SELECT a.id_tb_tv,b.id_tb,b.tb_name,b.descrition_table,c.id_view,c.view_names,e.id_field,e.field_name,e.description_field,d.id_tb_tf FROM table_view a ,table_name b ,view_name c , field_name e , table_field d where (a.id_tb=b.id_tb) and (a.id_view=c.id_view) and (d.id_tb=b.id_tb) and (d.id_field=e.id_field) ORDER BY a.id_tb_tv,d.id_tb_tf"; */
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
$Num_Rows = mysql_num_rows($objQuery);
?>
<!-- SELECT d.id_tb_tf,e.id_field,e.field_name,e.description_field,b.id_tb,b.tb_name FROM table_field d inner join (table_name b,field_name e) on (d.id_tb=b.id_tb and d.id_field=e.id_field) group by d.id_tb_tf -->
<th width="193"> <div align="center">Table name </div></th>
<th width="193"> <div align="center"> field name </div></th>
<th width="193"> <div align="center">View name </div></th>