BASH: Assigning MySQL SELECT result elements to different variables
<p>Perhaps I am overcomplicating but ,I'm have built the following statement:  </p>

<pre><code>query="SELECT url, users FROM result as r INNER JOIN search as s ON s.UID = r.SearchID WHERE s.isProcessed = 0
</code></pre>

<p>The next step is to loop though the result but I need to be able to call urls and users separately. That's how I am attempting it:</p>

<pre><code>while read -r link users; do
    output+=("$link", "$users")
done &lt; &lt;(mysql -h $host -u $user -p$pwd -s -N -D $db  -e "$query")

for i in ${!output[@]} ; do
    echo "${output[i]}" 
</code></pre>

<p>Any hint how to echo users only, please? 
The above will return both urls and users :(</p>