表格列未显示正确的格式
$lookupid = mysql_query("SELECT * FROM `idt_target_col` WHERE `idt_resource_id`='$user_id' AND `idt_target_tbl_type`='C' AND `idt_lookup_id`!='0'");
while($row = mysql_fetch_array($lookupid)){
$lookupId = $row['idt_lookup_id'];
}
$a=0;
$urrole=mysql_query("SELECT * FROM idt_resource_".$user_id."_user_role");
$a=0;
while($row=mysql_fetch_array($urrole)){
$uname[$a]=$row[$tbltypecol];
$role[$a]=$row[$tbltypekey];
$a++;
}
$cn=count($uname);
$cr=count($role);
for($h=0;$h<$cn;$h++){
$urr=mysql_query("SELECT * FROM idt_resource_".$user_id."_user WHERE $useridtbl=$uname[$h]");
if($urr){
while($row=mysql_fetch_array($urr)){
$uriid=$row[$useridtbl];
$fnnname=$row[$names];
$lnnname=$row[$lnname];
$urrname=$fnnname ." ".$lnnname;
echo"<tr><td>".$urrname." </td>";
}
}
$urrl=mysql_query("SELECT count(*) as idt_lookup_value FROM `idt_lookup_data` WHERE `idt_lookup_id`='$lookupId' AND `idt_lookup_key`=$role[$h]");
//echo "SELECT count(*) as idt_lookup_value FROM `idt_lookup_data` WHERE `idt_lookup_id`='$lookupId' AND `idt_lookup_key`=$role[$h]";
$num_rows = mysql_num_rows($urrl);
//echo "SELECT idt_lookup_value FROM `idt_lookup_data` WHERE `idt_lookup_id`='$lookupId' AND `idt_lookup_key`=$role[$h]";
if($num_rows==0){
while($row=mysql_fetch_array($urrl)) {
echo"<td></td></tr>";
}
} else {
$urrl1=mysql_query("SELECT idt_lookup_value FROM `idt_lookup_data` WHERE `idt_lookup_id`='$lookupId' AND `idt_lookup_key`=$role[$h]");
while($row=mysql_fetch_array($urrl1)){
$keyvalue1=$row['idt_lookup_value'];
echo"<td>".$keyvalue1."</td></tr>";
}
}
}