简体   繁体   English

phpmyadmin数据库表中的月份自动增加

[英]Month automatically increasing in phpmyadmin database table

Is there any way to increase a table field named month every month..or I should say to the latest month...Just need to update the month value..ie In, it should be 1 有什么办法可以增加一个名为每月的表字段。.或者我应该说到最近的月份...只需要更新月份值即可。即在其中应为1

march 3 3月3日

July 7 7月7日

etc. 等等

Help me. 帮我。

Closest you'll get without manually inserting idate ('m') with every new record and without using fancy mysql... is by using mysql default TIMESTAMP field. 在不使用每条新记录手动插入idate ('m')且不使用mysql的情况下,您将获得最近的结果。这是使用mysql默认的TIMESTAMP字段。 Check this out: 看一下这个:

http://dev.mysql.com/doc/refman/5.0/en/timestamp-initialization.html http://dev.mysql.com/doc/refman/5.0/en/timestamp-initialization.html

But this a date so you'll need to use MONTH( Field ) to get the month. 但这是一个日期,因此您需要使用MONTH( Field来获取月份。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM