title: Converting Array values into a temporary table
body: <p>I have two columns member id and author id</p>
  
  <p>Member A gives a list of author ids in a array format. I need to run a check against my database to see if these author ids are already there in my database, if they are present take the member ids of these authors and link them to the member id of A.</p>
  
  <p>What is the efficient method to do this? Is it advisable to store the author ids to a temporary table and run the check and fetch it. The number of author ids in the array runs to few thousands.</p>
  
  <p>Can you share some sample codes please? I am currently using PHP and MySql.</p>
  
  <p>Update - I get an array of JSON objects with author id and name as follows:</p>
  
  <pre><code>  {
       "name": "Harold Robinson",
       "id": "912065"
    },
    {
       "name": "Gilbert Patten",
       "id": "1212140"
    },
    {
       "name": "Leo Tolstoy",
       "id": "6012954"
    }
  </code></pre>
  
  <p>I already have a table called Authors against which these data needs to be compared and if the ids match the user id assigned to the author has to be linked to User A. </p>
  
  <p>Table Authors
  User id: 109876
  id: 912065</p>