Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /* A principio essa primeira parte dele, esta trazendo o ANO correto, só que o CodSerie, ele traz um anterior ou mesmo, eu creio que ele não está conseguindo pegar o CodSerie pra poder verificar na tabela de serie o CodTurma...
- $descricao_turma = $_GET['descricoes'];
- $serie = $_GET['series'];
- require "conexao.php";
- $result = mysql_query("select * from turma where codturma= $descricao_turma");
- while($row = mysql_fetch_array($result) ){
- echo "<option value='".$row['CODTURMA']."'>".$row['DESCRICAO']."</option>";
- }
- $result = mysql_query("SELECT serie.*, turma.*
- from turma
- join serie on serie.codserie = turma.codserie
- where turma.codserie=$serie " );
- while($row = mysql_fetch_array($result) ){
- echo "<option value='".$row['CODSERIE']."'>".$row['DESCRICAO_SERIE']."</option>";
- }*/
- //Aqui esta a parte implementada como estamos a discutir no fórum....
- require "conexao.php";
- if(isset($_GET['descricao_turma']))
- {
- $descricao_turma = $_GET['descricoes'];
- $result = mysql_query("select * from turma where codturma= $descricao_turma");
- while($row = mysql_fetch_array($result) )
- {
- echo "<option value='".$row['CODTURMA']."'>".$row['DESCRICAO']."</option>";
- }
- }
- if(isset($_GET['series']))
- {
- $serie = $_GET['series'];
- $result = mysql_query("SELECT serie.*, turma.*
- from turma
- join serie on serie.codserie = turma.codserie
- where turma.codserie=$serie " );
- while($row = mysql_fetch_array($result) )
- {
- echo "<option value='".$row['CODSERIE']."'>".$row['DESCRICAO_SERIE']."</option>";
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement