I have forgotten a lot about SQL and would like to be (gently) reminded how
to do this:
In a MySQL query on the database (one table with 15 variable length fields,
I want to put each field into a Bash variable so that I can handle each
field as an entity.
The query I have is something like this:
mysql -e "use $database; select field1, field2, field3..., from Table1 where
fieldN like '%something%';"
can I / How do I do something like:
mysql -e "use $database; select field1,..., var1=field1, var2=field2,....;"
do
stuff with var1, var2...,
done
I ask because SQL is subtle and quick to anger and I'm in a bit of a hurry.
Thanks!
--
If you wrestle in the mud with a pig.
you both get dirty, and the pig likes it.
-- Dave Dawson