- Timestamp:
- 11/14/08 12:10:05 (16 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r9163 r9164 23 23 * datacenter/scripts/sourcefile: 24 24 - added variable for sql.rc 25 - simplified code of two for-loops 25 26 26 27 -
trunk/MagicSoft/Mars/datacenter/scripts/sourcefile
r9163 r9164 261 261 getstepinfo 262 262 # get query 263 query=" select " 264 for (( i= 0; i < ${#prims[@]} ; i++ ))263 query=" select "${prims[0]} 264 for (( i=1 ; i < ${#prims[@]} ; i++ )) 265 265 do 266 if [ $i -lt `expr ${#prims[@]} - 1` ] 267 then 268 query=$query" ${prims[$i]}, " 269 else 270 query=$query" ${prims[$i]} " 271 fi 266 query=$query", ${prims[$i]}" 272 267 done 273 268 query=$query" from $table where " … … 365 360 query=$query", fFailedTime=$failedtime, fProgramId=$programid, fReturnCode=$returncode " 366 361 query=$query" where " 367 # query=$query" where $primary='$primvar'"368 362 if [ "$s" = "" ] 369 363 then 370 364 s=0 371 365 fi 372 for (( i=0 ; i < ${#prims[@]} ; i++ )) 366 query=$query" ${prims[0]}='${primaries[$s*${#prims[@]}]}'" 367 for (( i=1 ; i < ${#prims[@]} ; i++ )) 373 368 do 374 if [ $i -lt `expr ${#prims[@]} - 1` ] 375 then 376 query=$query" ${prims[$i]}='${primaries[$s*${#prims[@]}+$i]}' and " 377 else 378 query=$query" ${prims[$i]}='${primaries[$s*${#prims[@]}+$i]}' " 379 fi 380 done 369 query=$query" and ${prims[$i]}='${primaries[$s*${#prims[@]}+$i]}' " 370 fi 371 done 381 372 echo " QUERY: "$query 382 373 if ! mysql -s -u $us --password=$pw --host=$ho $db -e " $query "
Note:
See TracChangeset
for help on using the changeset viewer.