Tag Info

Hot answers tagged

3

SELECT statements will return number of rows into your shell variable. For DELETE statements just append a SELECT ROW_COUNT() after your mysql query, so it would be in your example like: RemoveID=`mysql -u root -proot -h 192.168.1.56 -e "delete from table where ID = '$1';select row_count()"` echo $RemoveID ROW_COUNT() 1



Only top voted, non community-wiki answers of a minimum length are eligible