zoukankan      html  css  js  c++  java
  • 小结

    1、mysql 无法插入、删除数据 Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column To disable safe mode, toggle the option in Preferences -> SQL Queries and reconnect.

    解决方案:SET SQL_SAFE_UPDATES = 0;

    2、mysql 定期清除表数据
    (1)写存储过程:
    create procedure del_data(IN `date_inter` int)
    begin
    delete from log where time < date_sub(curdate(),interval date_inter day);
    end
    (2)写event事件
    create event del_event
    on schedule
    EVERY 1 day
    STARTS '2016-11-20 03:00:00'
    ON COMPLETION PRESERVE ENABLE
    do call del_data(7)

    关闭事件任务: alter event del_event ON COMPLETION PRESERVE DISABLE;
    开户事件任务: alter event del_event ON COMPLETION PRESERVE ENABLE;

    查看刚才新建的事件:show events

    查看event是否开启: show variables like '%---%';
    将事件计划开启: set global event_scheduler = ON;

    3、GridView GridView1.Rows[index].Cells[4].Text;返回值为空。
    解决方案:string card = ((Label)GridView1.Rows[index].Cells[4].FindControl("Label4")).Text;

    4、

    Response.Write("<script language=javascript>alert('保存成功!');window.location = './PersonalInfo.aspx';</script>");

  • 相关阅读:
    SpringMVC扩展
    反射机制
    python day9
    python day8
    python day7
    python day6
    python day4
    python day3
    python day2
    python day1
  • 原文地址:https://www.cnblogs.com/Ghazi/p/6075441.html
Copyright © 2011-2022 走看看