i ma trying to insert detail in a variable but not got success
#!/bin/sh
mysql -u<username> -p<password> <dbname> << EOF
DEV=`mysql --skip-column-names <dbname> -e "SELECT timestamp from process_record where id = 1"`
EOF
echo $DEV
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1354888190' at line 1
its means i am gettting result. but why ia m getting result
Not all shells support arrays (especially sh if the sh in your first line (#!/bin/sh) really is an older Bourne shell), and it's not an ideal solution if the colums contain text with spaces.