我的问题是行mysql_query。我需要:
Record 0: 2,text is text,3.23
但是我有:
Record 0: 2
Record 1: text
Record 2: is
Record 3: text
Record 4: 3.23
请帮我。
results=($(mysql --user root -proot test -Bse "select id,name from Object"));
cnt=${#results[@]}
for (( i=0 ; i<${cnt} ; i++ ))
do
echo "Record No. $i: ${results[$i]}"
fieldA=${results[0]};
fieldB=${results[1]};
done