|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
MySQL error
I have a few tables and two of them are called teachers and teach. Teachers contain info about the teachers and teach contain the subjects which the teachers teach. When I do a query:
select * from Teachers where teach.subjectID=BM1; the result is this error:- Unknown table 'teach' in where clause what happened? can anyone enlighten me? Scumgrief |
|
#2
|
|||
|
|||
|
Because you are referencing a table in the where clause that you didn't define as a table you were selecting from.
How is it supposed to find records in 'Teachers' based on a condition in table 'teach' when you didn't join the tables?
__________________
FSBO (For Sale By Owner) Realty |
![]() |
| Viewing: Dev Shed Forums > Other > Beginner Programming > MySQL error |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|