CurrentDateFunction
string CDatabase::CurrentDateFunction()
The method returns SQL function that is used to return the current date. Specifically: "CURRENT_DATE" for MySQL and "TRUNC(SYSDATE)" for Oracle. Non-static method.
Parameters
No parameters.
See Also
Examples of use
<? $strSql = "UPD ATE my_table SE T DATE_CHANGE=".$DB->CurrentDateFunction()." WHERE ID=45"; $Query($strSql, false, "FILE: ".__FILE__."<br>LINE: ".__LINE__); ?>
<? $strSql = " SEL ECT ID FR OM my_table WHERE DATE_CREATE <= ".$DB->CurrentDateFunction()." "; $rs = $DB->Query($strSql, false, $err_mess.__LINE__); ?>
© «Bitrix24», 2001-2024