davecestria
asked on
PHP: Insert Date Into MSSQL DB
Hello Experts,
Very simple... i would like to enter the current date & time into my MS SQL DB, Field: LastMapUpdate using PHP.
My existing code is below, please advise how to modify for the desired results.
Thanks in advance.
Very simple... i would like to enter the current date & time into my MS SQL DB, Field: LastMapUpdate using PHP.
My existing code is below, please advise how to modify for the desired results.
Thanks in advance.
$sql = sprintf("UPDATE Routes SET EstDistance=%f, EstHours=%d, " .
"EstMins=%d, FinishDate='%s', FinishTime='%s', ReMap=0 WHERE ID=%d",
$cmdObject->totaldist, $cmdObject->totalhours, $cmdObject->totalmins,
$runfinishdate, $cmdObject->runfinishtime, $cmdObject->runid);
$res = $MyDB->ExecQuery($sql);
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER