These date and time come from MySQL database.
Here is the table of my database. This is where I draw out the information.
[code]-- phpMyAdmin SQL Dump
– version 4.0.10.14
– http://www.phpmyadmin.net
– Host: localhost:3306
– Generation Time: Oct 30, 2016 at 06:33 PM
– Server version: 10.0.27-MariaDB-cll-lve
– PHP Version: 5.4.31
SET SQL_MODE = “NO_AUTO_VALUE_ON_ZERO”;
SET time_zone = “+00:00”;
–
– Database: lnkx10bz_cis
–
– Table structure for table tact_time
CREATE TABLE IF NOT EXISTS tact_time
(
id
int(11) NOT NULL AUTO_INCREMENT,
lot_id
int(10) NOT NULL,
sub_id
int(11) NOT NULL,
proc_type
int(11) NOT NULL,
start_time
datetime NOT NULL,
end_time
datetime NOT NULL,
operator_id
int(11) NOT NULL,
input_qty
int(11) NOT NULL,
PRIMARY KEY (id
)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=18 ;
[/code]
From this databasse I get the start_time and end_time difference.
From another database with the same structure I get the start_time and end_time difference.
From this database I will deduct the answer with the another database difference.
Tota.diff = this.db.diff - another.db.diff
After deducting, I need to add all differences on a single variable then echo it to show the total time spent.
accum.variable += total.diff
If there are any unclear please advise. Sorry for my bad English. Thank you.