Jump to content
Pardon our ads (a necessary update) ×

query help


gmc1103

Recommended Posts

Hello

 

I'm having a problem regarding a query because i don't have all the records and i don't know why

This is the query

SELECT `ebspma_paad_ebspma`.`semana_dias`.`dia`,`ebspma_paad_ebspma`.`req_material_sala`.`sala`, `ebspma_paad_ebspma`.`req_material_tempo`.`inicio`, `ebspma_paad_ebspma`.`sala_ocupacao`.`id_ocup`, `ebspma_paad_ebspma`.`turmas`.`turma`
        FROM `ebspma_paad_ebspma`.`sala_ocupacao` INNER JOIN `ebspma_paad_ebspma`.`semana_dias` ON (`sala_ocupacao`.`id_dia` = `semana_dias`.`id_dia`)
        INNER JOIN `ebspma_paad_ebspma`.`req_material_sala` ON (`sala_ocupacao`.`id_sala` = `req_material_sala`.`idsala`)
        LEFT  JOIN `ebspma_paad_ebspma`.`req_material_tempo` ON (`sala_ocupacao`.`id_tempo` = `req_material_tempo`.`idtempo`)
        LEFT  JOIN `ebspma_paad_ebspma`.`turmas` ON (`sala_ocupacao`.`id_turma` = `turmas`.`id_turma`)
        where`ebspma_paad_ebspma`.`sala_ocupacao`.`id_turma` = '$turma' GROUP BY  `ebspma_paad_ebspma`.`sala_ocupacao`.`id_dia` ,  `ebspma_paad_ebspma`.`req_material_tempo`.`inicio` ASC

And i have this result (school_result.jpg) and it should be (school_result_correct.jpg) because in my school timetable i have two classroom for that class (school.jpg)

 

Any help why i can't have those values?

 

Thanks

 

post-174418-0-13151800-1442668360_thumb.jpg

post-174418-0-72142900-1442668392_thumb.jpg

post-174418-0-72590000-1442668497_thumb.jpg

Link to comment
https://forums.phpfreaks.com/topic/298227-query-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.



×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.