Witam serdecznie,
CREATE TABLE IF NOT EXISTS `message` (
`id` bigint(20) UNSIGNED NOT NULL,
`datawysylki` datetime DEFAULT NULL,
`zaproszenie` char(1) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
Kombinuję takim zapytaniem:
SELECT * FROM `message` WHERE TIMESTAMPDIFF(SECOND, datawysylki, now()) 30;