title: Storing value from SELECT to a variable
body: <p>I was making an Android applicaton, which has table called maintable in database.</p>
  
  <p>At first when the user installs my app it will create a row in the table for user which has _id as primary key. And I user query similar to this:</p>
  
  <pre><code>INSERT INTO table_name (col1, col2,...) 
  VALUES ('val1', 'val2'...);
  
  SELECT LAST_INSERT_ID();
  </code></pre>
  
  <p>By this I get the primary key for sure, but I want to store this value of users primary key into a variable in my application so that I can refer to users information using that value in the variable. </p>
  
  <p>Any help offered will be appreciated. Please...</p>