complex query

General discussions related to php

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 1
Joined: Thu Aug 16, 2012 8:59 am

complex query

Postby atxis » Thu Aug 16, 2012 9:11 am

I have a problem with a complex query, I hope someone can help me.
I have a table with a school classrooms: 1A, 1B, 2A, ...
I have another table with all schedules, with the following fields: "Teachers", "Monday_sub1" (subject of Monday in the first session), "Monday_sub2" ..... "Monday_cl1" (classroom on Monday in the first session) "Monday_cl2" ....
What I want is a query with which to obtain a table where each row is: "Classroom", "Monday_asig1", "Monday_asig2" ...
I tried to use multiple INNER JOIN and WHERE but no way.
Anyone could give me some clue about how?

Return to “PHP General”

Who is online

Users browsing this forum: No registered users and 3 guests