title: database phpmyadmin on insert trigger
body: <p>Have this SQL.</p>
  
  <pre><code>CREATE TABLE `accounts` (
    `account_id` int(3) NOT NULL,
    `username` varchar(36) NOT NULL,
    `password` varchar(36) NOT NULL,
    `email` varchar(60) NOT NULL,
    `access_level` int(1) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  CREATE TABLE `normal_profile` (
    `normal_profileid` int(11) NOT NULL,
    `first_name` varchar(64) NOT NULL,
    `middle_name` varchar(64) NOT NULL,
    `last_name` varchar(64) NOT NULL,
    `age` int(2) NOT NULL,
    `gender` varchar(6) NOT NULL,
    `account_id` int(3) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  ALTER TABLE `normal_profile`
    ADD CONSTRAINT `normal_profile_ibfk_1` FOREIGN KEY (`account_id`) REFERENCES `accounts` (`account_id`);
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/LIjQl.png" rel="nofollow noreferrer">phpmyadmin ui</a></p>
  
  <p>The above is how i set constraints.</p>
  
  <p>Whenever i insert something on to my accounts table, do i also have to query an insert into the normal_profile table? or can i automatically make it so that the DB itself will just add a row into normal_profile where account_id = accounts.account_id?</p>
  
  <p>I have a vague memory of an on insert constraint or maybe im mistaken?</p>
  
  <p><a href="https://i.stack.imgur.com/LIjQl.png" rel="nofollow noreferrer">Adding Trigger UI phpmyadmin</a></p>