This topic is locked

our old friend now()

9/25/2006 12:56:35 PM
PHPRunner General questions
M
markdorminy author

I've tried "now()" in my sql statement... i've tried a formatted date... (both statements work in mySQL just fine, but not here...) What am I missing?
function BeforeAdd(&$values)

{
// Parameters:

// $values - Array object.

// Each field on the Add form represented as 'Field name'-'Field value' pair
//** Save new data in another table ****

global $conn,$strTableName;

$archDate = date("Y-m-d H:i:s");

$strSQLUpdate = "update Items set Archive_Date = ";

$strSQLUpdate .= "'".$archDate."'";

$strSQLUpdate .= " where LogIndex =";

$strSQLUpdate .= $values["LogIndex"];

db_exec($strSQLUpdate,$conn);

}

M
markdorminy author 9/25/2006

OK, scratch all that... I found the error. I didn't retrieve the value in the original select statement.
MD