imnot163 / overtimecnt

statistics overtime days per month

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

overtimecnt

statistics overtime days per month

Using your database engines admin interface, create a simple table in your database:


"CREATE TABLE `overtime` (
  `month` varchar(11) DEFAULT '',
  `day` varchar(11) DEFAULT '',
  `overtime` tinyint(1) DEFAULT '0',
   PRIMARY KEY (`day`)
) ENGINE=MyISAM DEFAULT CHARSET=latin;"

And an initial row:


insert into overtime (month, day, overtime) values('201402', '20140201', 0);

Return to overtime.py to change the datebase config:


db = web.database(dbn='mysql', user='db_user', pw='db_pwd', db='db_dbname')

The value of the overtime in database is 0 means "work normal" whereas 1 means "work overtime".

About

statistics overtime days per month