Вот этот запрос:
PHP:
скопировать код в буфер обмена
скопировать код в буфер обмена
- $sql_reg =mysql_query ("SELECT region.name_reg, region.id_reg FROM region ") or die(mysql_error()); //опредиляем с какого региона сотрудник
- {
- //
- position.name_pos , day(dater) FROM official, position WHERE
- official.region = ".$row_reg['id_reg']." and month(dater) =".$data."
- and official.position=position.id_pos and aktive=1 ORDER BY day(dater)");
- official.region = ".$row_reg['id_reg']." and aktive=1
- and month(dater) =".$data."");
- //
- $count=$total['count(*)'];
- if ($count > 0)
- {
- echo "<table width=300 border=1 bordercolor=#B7D2BC cellpadding=3 cellspacing=0>
- <tr>
- <td bgcolor=#006633 colspan=3>
- <center><font color=#ffffff>".$row_reg['name_reg']."</font></center>
- </td>
- </tr>";
- {
- //Вывод на экран
- echo "<tr>";
- echo "<td width=156>".$row['fname']."<br>".$row['name']."<br>".$row ['othname']."</td>";
- echo "<td width=118>".$row['name_pos']."</td>";
- echo "<td width=26><nobr>$day."."$month</td>";
- }
- echo "<br>";
- }
- echo "</tr></table>";
- }