hmmm having trouble 🙂
tried
$sql = ("SELECT `siteurl`,`subsite`.`memberid` FROM `sites` WHERE DATE_ADD(`lastupdated`, INTERVAL `interval` MINUTE) < TIMENOW())");
and
$sql = ("SELECT * FROM `sites` WHERE DATE_ADD(lastupdated, INTERVAL 20 MINUTE) < TIMENOW()");
i wish mysql errors were more descriptive
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '()' at line 1
interval is the sql colum with the minutes in
lastupdated is the last updated timestamp
while we are solving this, you guys got any good books for learning mysql :0
edit ::
think i almost got it
$sql =
("
SELECT `siteurl`,`subsite`,`memberid` FROM `sites`
WHERE
DATE_ADD(`lastupdated`, INTERVAL `interval` MINUTE) < NOW()");
edit number two :::
nope 🙁 not got it... it runs but recieves nothing
$sql =
("SELECT `siteurl`,`subsite`,`memberid` FROM `sites`
WHERE
DATE_ADD(`lastupdated`, INTERVAL `interval` MINUTE) < NOW()");
shows when you echo it
SELECT `siteurl`,`subsite`,`memberid` FROM `sites` WHERE DATE_ADD(`lastupdated`, INTERVAL `interval` MINUTE) < NOW()
with no numbers, lastupdated and interval should be numbers 🙁