PHP: Inserting the current timestamp into SQL Server 2005

PHPsql server

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 Answer

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

update MyTable set MyColumn=getdate();

or

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