title: MYSQL in PHPMYADMIN - create table relationship from one table
body: <p>I want to create a table relationship with MYSQL PHPMYADMIN.</p>
  
  <p><img src="https://i.stack.imgur.com/0A5Gj.png" alt="enter image description here"></p>
  
  <p>I have this Create table:</p>
  
  <pre><code>CREATE TABLE students(code_students int(8)not null AUTO_INCREMENT,
  name_students varchar(25),
  age_students int(3),
  degree_program varchar(25),
  code_advisor int(8)not null,
  primary key(code_students, code_advisor)
  );
  </code></pre>
  
  <p>and i want to make a create table named advise relationship between code_students, code_advisor.</p>
  
  <p>Ok this is my tryout.</p>
  
  <pre><code>CREATE TABLE advise (
  code_students int(8),
  code_advisor int(8),
  primary key(code_students, code_advisor),
  foreign key(code_students)references students(code_students),
  foreign key(code_advisor)references students(code_advisor)
  );
  </code></pre>