problem-record-mysql
#!/bin/bash # # Update_Problem - updates problem record in database ############################################################### # Determine sql location & set variable # MYSQL=`which mysql`" Problem_Task -u testuser" # ################################################################ # ] #Check if id number was passed. then # # 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 records need updating..." $MYSQL <<EOF select id_number,report_date,prob_symptoms from problem_logger where fixed_date="0000-00-00" or prob_solutions=""\G EOF fi echo echo "What is the ID number for the" echo -e "problem you want to update?:\c" read ANSWER ID_NUMBER=$ANSWER else ID_NUMBER=$ fi # ################################################################ # Obtain Solution (aka Fixed) Date # echo echo -e "Was problem solved today?[y/n] \c" read ANSWER # case ANSWER in y|Y|yes|Yes|yEs|yeS|YEs|yES|YeS|YES) FIXED_DATE=`date +%Y-%m-%d` ;; *) #if answer is anything but yes,ask for date echo echo -e "What was the date of resolution?[YYYY-MM-DD]\c" read ANSWER # FIXED_DATE=$ANSWER ;; esac # ############################################################### # Acquire problem solution # echo echo -e "Briefly describe the problem solution :\c" # read ANSWER PROB_SOLUTIONS=$ANSWER # ############################################################## # Update problem record # # echo echo "Problem record updated as follows:" echo $MYSQL <<EOF UPDATE problem_logger SET prob_solutions="$PROB_SOLUTIONS" fixed_date=$FIXED_DATE WHERE id_number=$ID_NUMBER # select * from problem_logger where id_number=$ID_NUMBER\G EOF # #END
problem-record-mysql的更多相关文章
- data structure assignment problem record
Question1: Similar to pause command in linux read -n 1 Question2 read : Illegal option -n 原因为ubuntu ...
- 学习笔记:The Best of MySQL Forum
http://mysql.rjweb.org/bestof.html I have tagged many of the better forum threads. 'Better' is based ...
- Centos 7 mysql Buffered warning: Changed limits: max_connections: 214 解决方法
Everytime I restart MySQL I have this warning: [Warning] Buffered warning: Changed limits: max_conne ...
- Snippet: Fetching results after calling stored procedures using MySQL Connector/Python
https://geert.vanderkelen.org/2014/results-after-procedure-call/ Problem Using MySQL Connector/Pytho ...
- mysql 区间锁 对于没有索引 非唯一索引 唯一索引 各种情况
The locks are normally next-key locks that also block inserts into the "gap" immediately b ...
- 如何将MongoDB数据库的数据迁移到MySQL数据库中
FAQ v2.0终于上线了,断断续续忙了有2个多月.这个项目是我实践的第一个全栈的项目,从需求(后期有产品经理介入)到架构,再到设计(有征询设计师的意见).构建(前端.后台.数据库.服务器部署),也是 ...
- MySQL的my-innodb-heavy-4G.ini配置文件的翻译
我根据MySQL配置文件的英文文档说明,在根据自己所学的知识,使用有道词典对不懂的单词进行了查询,一个一个翻译出来的.有的专业术语翻译的不好,我使用了英文进行标注,例如主机(master)和副机(sl ...
- 【MYSQL】MYSQLの環境構築
ダウンロード:https://dev.mysql.com/downloads/mysql/ 手順① 手順② mysql.iniの設定について [mysql]default-character-set= ...
- MySQL系统变量auto_increment_increment与auto_increment_offset学习总结
在MySQL中,系统变量auto_increment_increment与auto_increment_offset是与自增列相关的两个参数变量.在官方文档中,将其划分为Replication Mas ...
- MySQL高级配置
参考文章:http://www.jb51.net/article/47419.htm https://blog.csdn.net/waneto2008/article/details/52502208 ...
随机推荐
- 论Linux运维的一些基础安全知识和简单办法
不知不觉本人来北京也已经第三个年头了,从一个Linux小小鸟,开始,2012年我参加了第一份工作,其实现在想想其实我是幸运的,本来求学的时候,就没好好的学Linux,我认为有Cisco知识从上wind ...
- 自己用WordPress搭了个站点
这周买了台阿里云,用wordpress搭了个自己的站点,折腾了几天. 网站的网址是 http://www.smarteyeball.com/ ,取名慧眼网,宗旨是让大家发现新世界.
- WCF--安全小见解...
由于WCF写的服务需要Ajax来进行调用(这个配置过程也是一个比较咕~~(╯﹏╰)b的经历...), 所以调用的过程都是前台可以看到的,不加点安全措施上去,真的像是一个裸奔在互联网上的接口... 反正 ...
- 【Solr】索引库查询界面详解
目录 索引库查询界面详解 回到顶部 索引库查询界面详解 q:主查询条件.完全支持lucene语法.还进行了扩展. fq:过滤查询.是在主查询条件查询结果的基础上进行过滤.例如:product_pric ...
- 微信公众平台开放JS-SDK(微信内网页开发工具包)
微信公众平台开放JS-SDK(微信内网页开发工具包),这次开放接口是质的飞跃,是对开发者和广大用户一个利好的消息.未来的公众号图文消息会更丰富多彩,准备脑洞大开吧!(第三方平台正式支持接入微信公众平台 ...
- 如何自定义wordpress登录界面的Logo
每次登录wp后台都会看到wordpress的logo,会不会有点烦呢?想不想换个新的.自己设定一个呢?那么如何自定义wordpress登录界面的Logo呢? 把代码复制到当前主题的 functions ...
- Java VisualVM使用:堆OOM
背景 近期遇到了一个java.lang.OutOfMemoryError: Java heap space的问题,排除了堆设置过小的问题,代码走查没有头绪,所以使用VisualVM工具分析堆内存情况. ...
- zepto触摸事件解决方法
移动项目开发过程中,经常需要用到滑动的事件来处理一些效果.通常情况下,我们会通过 touchstart->touchmove->touchend 的过程来定义这个事件.这些事件的触发顺 ...
- java使用split分隔,需要注意的点
String severName = "10.6.62.244"; System.out.println(severName.split(".").length ...
- polymorphic-associations 多态关联实例 ruby on rails
这次做新项目的时候,把图片都放在了一个表里,其他表中不再存图片信息,通过多态关联建立表之间的关系. (1)新建picture表, component表不需要处理 class CreatePicture ...