|
Posted by dutch disCo on 10/13/71 11:47
Hi,
I have two tables that relate to each other by users ids. I want to
fetch a fow as follows:
SELECT user_id,username,homedir FROM users,ftpusers WHERE user_id=id AND
username='zdzisio';
But instead of getting this:
+---------+------------------+--------------------+
| user_id | username | homedir |
+---------+------------------+--------------------+
| 11 | zdzisio | /home/zdzisio/ |
+---------+------------------+--------------------+
I want to get something like this:
+--------------------+
| homedir |
+--------------------+
| /home/zdzisio/ |
+--------------------+
In other words: I want to select all three fields from both tables but
display only one of them.
How to do that?
Any help appreciated
Respect
dd
Navigation:
[Reply to this message]
|