Jump to content

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.