Tag Info

Hot answers tagged


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 -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