title: Store multiple values from sql select in bash
body: <p>I am trying to store each value from the following sql select statement and store them in separate variables using bash.</p>
  
  <pre><code> #!/bin/bash
   mysqlhost="thehost"
   mysqldb="thedb"
   mysqlun="theusername"
   mysqlpw="thepassword"
   mysqlconnection="--disable-column-names --host=$mysqlhost --user $mysqlun --password=$mysqlpw --database=$mysqldb"
  
  declare -a pinIDs=$(mysql $mysqlconnection -e "SELECT pinID FROM somewhere WHERE something = something";)
  </code></pre>
  
  <p>I get the following result when I use code </p>
  
  <pre><code>echo $pinIDs    
  </code></pre>
  
  <p>8 11 23 26</p>
  
  <p>I need to store each of those values into their own variable.</p>