Click to See Complete Forum and Search --> : MOD Alternative


lmf232s
02-13-2006, 02:33 PM
Im looking for a MOD like Function.
You may be able to help me come up w/ a different solution
What i need to do is send a email reminder every 24 hours its overdue. This could continue for weeks but most likely it will be taken care of w/ the first reminder.

What i have so far and it works but i need it to be more flexable.

Select dateDiff("Hour", Date_Created, CURRENT_TIMESTAMP) as TotalTime
From Requests
WHERE dateDiff("Hour", Date_Created, CURRENT_TIMESTAMP) = 24

w/ out typing

WHERE dateDiff("Hour", Date_Created, CURRENT_TIMESTAMP) = 24
AND dateDiff("Hour", Date_Created, CURRENT_TIMESTAMP) = 48
AND dateDiff("Hour", Date_Created, CURRENT_TIMESTAMP) = 96, etc...

chazzy
02-13-2006, 02:54 PM
MySQL does have a mod operator, yanno.

http://dev.mysql.com/doc/refman/4.1/en/operator-precedence.html

lmf232s
02-13-2006, 02:55 PM
Which would come in handy if i was using mySQL.

Im using SQL Server.

chazzy
02-13-2006, 03:36 PM
sorry, your syntax was similar to mysql

m$ says sql server supports %


http://www.microsoft.com/technet/prodtechnol/sql/70/proddocs/admincmp/75517c11.mspx

lmf232s
02-13-2006, 05:18 PM
Thats what i was looking for. Thanks.