PHP: Inserting the current timestamp into SQL Server 2005


How do I insert a current_timestamp into an SQL Server 2005 database datable with a timestamp column?

It should be simple but I cannot get it to work. Examples would be much appreciated.

Best Solution

if you can execute a query from PHP then it should just be a matter of using 'getdate()' ;

update MyTable set MyColumn=getdate();


insert into MyTable (MyColumn) values (getdate());