followup to my initial question.....
i can use the following select query to get close... however, it doesn't
really use 'left joins', and i can't figure out how to arive at the results
with the user names being correctly identified.
mysql> select
-> p1.name as pname,
-> p2.statusID as pstatus,
-> u1.urltype as urltype,
-> p1.userID as owner,
-> u2.name,
-> u3.name as school
-> from universityTBL as u3 ,
-> university_urlTBL as u1,
-> parsefileTBL as p1,
-> parsefilestatusTBL as p2
-> left join userTBL as u2
-> on u2.ID = p1.userID
-> where u1.universityID = u3.ID
-> and p1.university_urlID = u1.ID
-> and p2.fileID = p1.fileID
-> and u1.universityID='40';
+-------+---------+---------+-------+------+--------+
| pname | pstatus | urltype | owner | name | school |
+-------+---------+---------+-------+------+--------+
| | 1 | 1 | 0 | NULL | www |
| | 1 | 2 | 0 | NULL | www |
| | 1 | 3 | 0 | NULL | www |
| blah | 1 | 4 | 1 | NULL | www |
+-------+---------+---------+-------+------+--------+
4 rows in set (0.14 sec)
this result is close... the 'owner' has the ownerid which references the
userTBL.ID
the userTBL is
+-------+---------+
| ID | name |
+-------+---------+
| 1 | tom |
+-------+---------+
so, i'm trying to figure out how to create a query, that returns the
following, combining the earlier query, with the userTBL..
+-------+---------+---------+-------+------+--------+
| pname | pstatus | urltype | owner | name | school |
+-------+---------+---------+-------+------+--------+
| | 1 | 1 | 0 | NULL | www |
| | 1 | 2 | 0 | NULL | www |
| | 1 | 3 | 0 | NULL | www |
| blah | 1 | 4 | 1 | tom | www |
+-------+---------+---------+-------+------+--------+
anyideas/assistance, etc would be appreciated.
thanks
-bruce
again, i'd like to figure our how to use the 'left joins' to derive the
results..
thanks!!!
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]