I need to store in array the results retrieved from the database. So far this is basically what I'm trying with no success.
Myarray=$(echo "SELECT A, B, C FROM table_a" | mysql database -u $user -p$password)
My understanding of bash commands is not very good as you can see. thank you.
echo "SELECT A, B, C FROM table_a" | mysql database -u $user -p$password
produce the results that you want to capture? If it doesn't, you need to get that working first, and then worry about the command substitution.