So you have several table for the teachers.
make the join and instead of using use on
so:
select disctinct * from table1 left join table2 on table1.for_key12=table2.for_key21
left join table3 on
table2.for_key23=table3.for_key32
Example :
select disctinct * from teacher1 left join teacher2 on teacher1.shool=teacher2.kindga;
Regards,
Andrey
- Original Message -
From: Vasoczki Ferenc [EMAIL PROTECTED]
To: 'Andrey Hristov' [EMAIL PROTECTED]
Sent: Tuesday, April 09, 2002 11:47 AM
Subject: RE: [PHP] Soring an array
hm, maybe, just i don't understand this join exactly...
as i said i have 5 tables. every table have a primary key. The 1-3 this
called school, in the 4-5 this called: kindergarten. And i want to get
out, all the different month, and year.
like:
Teacher table:
shool | month |year |
25485 04 2001
etc...
Teacher table:
kindga| month |year |
25485 04 2001
25485 03 2002
etc...
imagine the rest of..
and i need only 2 items:
042001
032002
Vaso
-Original Message-
From: Andrey Hristov [mailto:[EMAIL PROTECTED]]
Sent: 2002. április 9. 10:39
To: Vasoczki Ferenc
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Soring an array
select distinct member_id from mails_sent left join member_info
using(member_id) left join stats_done using(member_id)...
so
select distinct number_number from table1 left join table2
using(you_foreign_key) left join table3 using(your_foreign_key2)
your_foreign_key* is a field common to table(x) and table(x+1)
HTH
Regards,
Andrey Hristov
- Original Message -
From: Vasoczki Ferenc [EMAIL PROTECTED]
To: Php Mailing List (E-mail) [EMAIL PROTECTED]
Sent: Tuesday, April 09, 2002 11:26 AM
Subject: [PHP] Soring an array
Hi!
I am new on this list, so i welcome everybody!
/sorry if my english is not too good/
My problem is:
I want to sort an array.
I found the array_multisort funciton in the help, but that is for
multidimensional arrays, or 2 or more arrays.
What i need exactly.
I have 5 MySQL tables, and i want to collect some informations from all
theese tables, and then get out only the different items.
Like: 1st table: 1,2,3 2nd: 2,4,3 3rd: 5,1,5
I need an array, what will include 1,2,3,4,5
So i thought, i collect all the numbers in 1 array, then sort it, and then
get out the duplicat items.
Any suggestion ?
Thx
Vaso
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php