What you need to do is specify username in your select query and JOIN
the two tables together.

Marks table:

User_id | Marks

User Table

User_id | Name

Query:

SELECT User.Name, Marks.Marks FROM User, Marks WHERE User.User_id =
Marks.User_id


Regards,
Mike Hillyer
www.vbmysql.com


-----Original Message-----
From: Jonas Geiregat [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 16, 2003 9:55 AM
To: [EMAIL PROTECTED]
Subject: mysql design question ?


| user_id | Marks | Now I have an other table where I keep the name 
etc.. from each user. You will all kill me for this, but in access you 
could the setup a relation between user_id and the id of the user in the

user table. Is something like that possible in mysql ?
So that if I select some data from the | user_id | Marks | table I get 
his name instead of his ID ?
or should I first get his ID, and with that ID query his marks out of 
the table ?


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to