sasha85
11-08-2007, 05:33 PM
i got this line before:
mySQLde="UPDATE crmagents SET online=NULL WHERE online < DATE_ADD(LOCALTIME(),INTERVAL -20 MINUTE)"
it working perfectly! it was nulling all the records older than 20min
but i needed to add the nulling opration of the fields on the second table than i wrote this
mySQLde="UPDATE crmagents, crminfo SET crmagents.online = NULL , crminfo.Agent = NULL WHERE crmagents.online < DATE_ADD(LOCALTIME(),INTERVAL -20 MINUTE) AND crminfo.agent = crmagents.username"
and now even the old records do not nulling...
help!!
mySQLde="UPDATE crmagents SET online=NULL WHERE online < DATE_ADD(LOCALTIME(),INTERVAL -20 MINUTE)"
it working perfectly! it was nulling all the records older than 20min
but i needed to add the nulling opration of the fields on the second table than i wrote this
mySQLde="UPDATE crmagents, crminfo SET crmagents.online = NULL , crminfo.Agent = NULL WHERE crmagents.online < DATE_ADD(LOCALTIME(),INTERVAL -20 MINUTE) AND crminfo.agent = crmagents.username"
and now even the old records do not nulling...
help!!