-1
Ich habe die folgende Tabelle und DatenMySQL Query Probleme und zwischen der Verwendung von Terminen
DROP TABLE IF EXISTS `notas`;
CREATE TABLE `notas` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`cliente` int(11) DEFAULT NULL,
`data_lanc` date DEFAULT NULL,
`data_pgto` date DEFAULT NULL,
`descricao` varchar(255) DEFAULT NULL,
`valor_conta` decimal(13,3) DEFAULT NULL,
`valor_pago` decimal(13,3) DEFAULT NULL,
`pago` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
INSERT INTO `notas` VALUES ('1', '2', '2016-08-23', null, 'Notas Rodrigo 24/07/2016 até 24/07/2016', '0.000', null, null);
INSERT INTO `notas` VALUES ('2', '2', '2016-08-23', null, 'Notas Rodrigo 24/07/2016 até 24/07/2016', '89.950', null, null);
Und ich habe diese Abfrage
SELECT *
FROM notas
WHERE notas.cliente = '2' AND
notas.data_lanc BETWEEN '2016-01-07' AND '2016-07-24'
Es sollte beide Datensätze zurück, aber die Abfrage immer leer zurück. Was mache ich falsch?