I have following code, I select from one table data and in two columns I need to read from another table names of numeric values in first table. And I have a problem that is in the second column named intSupplier I see only one names and other entries in this column is empty. I hope that i describe this problem a quite well. Sorry but I need help.......
help me pls
<?
session_save_path("../tmp/");
session_start();
$user=$_SESSION['username'];
?>
<html>
<head>
<meta http-equiv="Content-Language" content="cs">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250">
<link rel="stylesheet" type="text/css" href="../styles/default.css">
<title>Sestava -- nove vlozene OTP</title>
<?
if($user){
include "../config/mssql.php";
$seeotpnew=mssql_query("SELECT * FROM tbl_prijem_MTP WHERE intStatus='1'");
echo "<table><tr><td width='' bgcolor='#C0C0C0'><form action='../scripts/cross.php' method='POST'><input type=submit
value='Zpet'></form></td><td></td><td></td><td></td><td></td><td></td><td width='' bgcolor='#C0C0C0'>
<form action='../logout.php' method='POST'><input type=submit value='LogOut'></form></td></tr></table>";
echo "<table cols=''><tr><td width='' bgcolor='#C0C0C0'>pk_Prijem</td><td width='*' bgcolor='#C0C0C0'>intCount</td><td
width='' bgcolor='#C0C0C0'>strSeries</td><td width='' bgcolor='#C0C0C0'>intNumberFrom</td><td width='*'
bgcolor='#C0C0C0'>intNumberTo</td><td width='' bgcolor='#C0C0C0'>intCustomer</td><td width=''
bgcolor='#C0C0C0'>intSupplier</td><td width='' bgcolor='#C0C0C0'>intStatus</td><td width=''
bgcolor='#C0C0C0'>strNumberVoucher</td><td width='' bgcolor='#C0C0C0'>strDateVoucher</td><td width=''
bgcolor='#C0C0C0'>dtmNow</td></tr>";
/ vypis smycky z tbl_prijem_MTP /
while ($vypis=mssql_fetch_array($seeotpnew)) {
$seeforcust=mssql_query("SELECT strName FROM tbl_Customer WHERE intIco='$vypis[5]'");
$seeforsupp=mssql_query("SELECT strName FROM tbl_Supplier WHERE intIco='$vypis[6]'");
echo "<tr><td width='*' bgcolor='#C0C0C0'>$vypis[0]</td><td width='*'bgcolor='#C0C0C0'>$vypis[1]</td><td
width='*' bgcolor='#C0C0C0'>$vypis[2]</td><td width='*' bgcolor='#C0C0C0'>$vypis[3]</td><td width='*'
bgcolor='#C0C0C0'>$vypis[4]</td><td width='*' bgcolor='#C0C0C0'>";
while($vypiscust=mssql_fetch_array($seeforcust)){
echo "$vypiscust[0]"; }
echo "</td>";
echo "<td width='*' bgcolor='#C0C0C0'>";
while($vypissupp=mssql_fetch_array($seeforsupp)){
echo "$vypissupp[0]"; }
echo "</td>";
echo "<td width='*' bgcolor='#C0C0C0'>$vypis[7]</td><td width='*'
bgcolor='#C0C0C0'>$vypis[8]</td><td width='*' bgcolor='#C0C0C0'><$vypis[9]</td><td
width='*' bgcolor='#C0C0C0'>$vypis[10]</td></tr>";
}
echo "</table>";
}else{
include "../config/chyba.php";
}
?>