Zach wrote:
I am writing a shell script using Born Shell. I am trying to get the
result of a SQL statement into a variable.


For example:

/usr/bin/mysql -uroot -prootpass BOB << EOF
SELECT * FROM Bobstable WHERE Name=1
EOF

How do I get the result into a variable?

Thanks in advance!

May be:
myvar=`/usr/bin/mysql -uroot -prootpass -e 'SELECT * FROM Bobstable WHERE Name=1;' BOB`


But this is more a shell than a mysql question, isn't it ?

Joseph Bueno


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to