I have a query say :
"select .... " > $my_result
This will store in the my_result
but as a file. How to store in a my_result
variable itself if that query gives only one row without creating a file.
I have a query say :
"select .... " > $my_result
This will store in the my_result
but as a file. How to store in a my_result
variable itself if that query gives only one row without creating a file.
Simplest way would be:
my_result=$(select ...)
And when you want to print it:
echo $my_result