If I have a table like this:
如果我有这样的表:
CREATE TABLE IF NOT EXISTS `codetransactions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_customer` int(11) DEFAULT NULL,
`id_cashier` int(11) DEFAULT NULL,
`id_code` int(11) DEFAULT NULL,
`program_type` int(11) DEFAULT NULL,
`id_codeaccount` int(11) DEFAULT NULL,
`tmstmp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`value1` int(11) DEFAULT NULL,
`value2` int(11) DEFAULT NULL,
`comment` varchar(150) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
CREA