При заявка в phpmyadmin излиза това съобщение:
[sql]SELECT COUNT( `id` )
FROM `table`
WHERE `end` > NOW( )
AND `price` > '0'
AND `price` < '1000'
AND `discount` > '0'
AND `discount` < '100'
ORDER BY id DESC [/sql]
И изкарва грешен брой резултати.
Структурата:
[sql]
`price` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`discount` int(3) NOT NULL,
PRIMARY KEY (`id`,`price`,`discount`)[/sql]
Според мен всичко е точно и не се сещам къде е проблема.
Ето и заявката:This table does not contain a unique column. Grid edit, checkbox, Edit, Copy and Delete features are not available.
[sql]SELECT COUNT( `id` )
FROM `table`
WHERE `end` > NOW( )
AND `price` > '0'
AND `price` < '1000'
AND `discount` > '0'
AND `discount` < '100'
ORDER BY id DESC [/sql]
И изкарва грешен брой резултати.
Структурата:
[sql]
`price` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`discount` int(3) NOT NULL,
PRIMARY KEY (`id`,`price`,`discount`)[/sql]
Според мен всичко е точно и не се сещам къде е проблема.