title: How do you combine these 3 mySQL queries into one?
body: <p>The schematic code of what I am trying to do:</p>
  
  <pre><code>INPUT VAR inputOne; (First input of the desired statement)
  INPUT VAR inputTwo; (Second input of the desired statement)
  INPUT VAR inputThree; (Third input of the desired statement)
  
  -
  
  VAR repResult = getResult("SELECT * FROM `representatives` WHERE `rID` = inputOne LIMIT 1;")
  VAR evResult = getResult("SELECT `events`.`eID` FROM `events` WHERE `eventDateTime` = inputTwo LIMIT 1;")
  
  if (repResult != null &amp;&amp; evResult != null) {
      execureQuery("INSERT INTO `votes` (`representatives_rID`, `events_eID`, `voteResult`) VALUES(inputOne,evResult.eID,inputThree);");
  }
  </code></pre>
  
  <p>It is quite slow, when I execute them in separated statement, especially because there are ~1.000.000 that needs to be checked and inserted.
  I was wondering, if there is any alternative, one-query way of doing this.</p>