#!/bin/bash # # Update_Problem - updates problem record in database # ############################################################ # # Determine sql location & set variable # MYSQL=`which mysql`" Problem_Trek -u root" # ############################################################## # # Obtain Record Id # if [ $# -eq 0 ] # Check if id number was passed then # If not passed ask for it # # Check if any unfinished records exist. RECORDS_EXIST=`$MYSQL -Bse 'SELECT id_number FROM problem_logger where fixed_date="0000-00-00" OR prob_solutions=""'` # if [ "$RECORDS_EXIST" != "" ] then echo echo "The following record(s) need updating..." $MYSQL <