Сообщение от omepta.cc
|
$zap01 = 'SELECT * FROM sot ' ;
$ath01 = mysql_query($zap01);
while($row=mysql_fetch_array($ath01))
{
$COTRUD = $row['name'] ;
$zap02 = 'SELECT * FROM rabot WHERE ispol = "'.$COTRUD.'" ' ;
$ath02 = mysql_query($zap02);
while($row2=mysql_fetch_array($ath02))
{
$BPEMEHHO = $row2['sum'] ;
$TEKy = $TEKy+$BPEMEHHO ;
}
ECHO ' СОТРУДНИК '.$COTRUD.' ИТОГО '.$TEKy ;
$TEKy = '' ;
}
|
Спасибо помогло....
подскажи как добавить сюда
$zap02 = 'SELECT * FROM rabot WHERE ispol = "'.$COTRUD.'" ' ;
"AND"
$zap02 = 'SELECT * FROM rabot WHERE ispol = "'.$COTRUD.'" AND id_zakaz='$id' ' ;