dongyou7739 2016-04-29 23:29
浏览 17
已采纳

每年更新Mysql中的列

I would like to update few columns in my database every year. I am using PHP and MYSQL.

How to update/reset the columns to specific values every year ?

I have heard that we use it with the Time stamp.

I have searched a lot about it .. nothing found.

Can someone help me ?

Thanks in Advance :)

EDIT 1 :

I am making an election system for my DBMS project.

This is how my table looks like

student table in database

I would like to refresh the register_Check and C_reg_no columns every year !!

  • 写回答

3条回答 默认 最新

  • drg5577 2016-04-29 23:42
    关注

    Ideally you would restructure your database to handle different values for different years.

    Move those columns into another table and a column for year and another as a foreign key field to link the registration info to the user info. Then you can keep track of the values for each year.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 安卓C读取/dev/fastpipe屏幕像素数据
  • ¥15 pyqt5tools安装失败
  • ¥15 mmdetection
  • ¥15 nginx代理报502的错误
  • ¥100 当AWR1843发送完设置的固定帧后,如何使其再发送第一次的帧
  • ¥15 图示五个参数的模型校正是用什么方法做出来的。如何建立其他模型
  • ¥100 描述一下元器件的基本功能,pcba板的基本原理
  • ¥15 STM32无法向设备写入固件
  • ¥15 使用ESP8266连接阿里云出现问题
  • ¥15 BP神经网络控制倒立摆