Bitrix Site Manager

CDatabase::CurrentTimeFunction

string
CDatabase::CurrentTimeFunction()

The method CurrentTimeFunction returns the string SYSDATE for Oracle version and now() for MySQL.

Parameters

No parameters.

See Also

Example



<?
$DB->Update("my_table", 
            Array("TIME_CHANGE" => $DB->CurrentTimeFunction()), 
"WHERE ID=45", $err_mess.__LINE__);
?>
<?
$strSql = "
    UPDATE my_table SET 
        TIME_CHANGE=".$DB->CurrentTimeFunction()." 
    WHERE ID=45
    ";
$Query($strSql, false, "FILE: ".__FILE__."<br>LINE: ".__LINE__);
?>
<?
$strSql = "
    SELECT 
        ID
    FROM 
        my_table
    WHERE 
        TIME_CHANGE <= ".$DB->CurrentTimeFunction()."
    ";
$rs = $DB->Query($strSql, false, $err_mess.__LINE__);
?>