For example, if I execute the code below under my Windows 7, my PHP works under Windows 7 / IIS.
echo time() I will get this 1304972050
How can I get the same result in MSSQL?
SELECT DATEDIFF(ss, '1/1/1970 05:00:00', GETUTCDATE())
Have to do.
UPDATED for comment.
To get time in sql:
SELECT DATEDIFF(s,'19700101 05:00:00:000',GETUTCDATE())
You will not get this out of the box, but you can find functions defined on sql servers, for example. http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=66858 .