Answer the question
In order to leave comments, you need to log in
How to make a connection between a table in a database?
Hello! I have a registration on the PHP and MYSQL site, I created a table in the users database, the registration is fine, I have a question: How to bind to the login of the information that the client will enter into the database in his account? Most likely you need to make a connection between tables, but how to do it?
Answer the question
In order to leave comments, you need to log in
Yes, create at least one more table, for example user_info and associate it with the users table, usually by the user_id field
it is possible to make fields for filling in data directly in this table, which he can then edit
SELECT (SELECT login FROM users WHERE id=userinfo.idinfo ORDER BY id ASC LIMIT 1) as login FROM userinfo
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question