Home › Forums › Back End › sql table info needed › Reply To: sql table info needed
July 13, 2014 at 9:42 pm
#175356
Rohithzr
Participant
My table schema
CREATE TABLE payments (
payId int(8) NOT NULL AUTO_INCREMENT,
amount decimal(6,2) NOT NULL,
pack decimal(6,2) NOT NULL DEFAULT '0.00',
date date NOT NULL,
clearingDate timestamp NULL DEFAULT NULL,
time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
status tinyint(1) NOT NULL DEFAULT '0',
opId int(4) NOT NULL,
cId int(7) NOT NULL,
lnId int(4) NOT NULL DEFAULT '0',
PRIMARY KEY (payId),
KEY cId (cId),
KEY opId (opId),
CONSTRAINT payments_ibfk_1 FOREIGN KEY (cId) REFERENCES customers (cId),
CONSTRAINT payments_ibfk_2 FOREIGN KEY (opId) REFERENCES operators (opId)
) ENGINE=InnoDB AUTO_INCREMENT=149658 DEFAULT CHARSET=latin1