i current used -
SELECT * FROM `texts` WHERE `content` IS NOT NULL AND `messagesent` = 0 LIMIT 5
to pull in the sms to display.
i though by doing
UPDATE `texts` SET `messagesent` = 1 WHERE id = ".$row." AND datereceived BETWEEN CURRENT_TIMESTAMP - INTERVAL 20 MINUTE AND CURRENT_TIMESTAMP
after the contents had been displayed it would then update any id with the timestamp of now and between 20 mins old and it appears to just update them after around 5 and i have checked the code to confirm it's set to 20.
have i done something wrong?