本文整理汇总了PHP中global_common::nowDateSQL方法的典型用法代码示例。如果您正苦于以下问题:PHP global_common::nowDateSQL方法的具体用法?PHP global_common::nowDateSQL怎么用?PHP global_common::nowDateSQL使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类global_common
的用法示例。
在下文中一共展示了global_common::nowDateSQL方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Model_Article
<?php
/* TODO: Add code here */
require 'config/globalconfig.php';
include_once 'include/_permission.inc';
include_once 'class/model_user.php';
include_once 'class/model_article.php';
$objArticle = new Model_Article($objConnection);
$objUser = new Model_User($objConnection);
if (global_common::isCLogin()) {
//get user info
$userInfo = $_SESSION[global_common::SES_C_USERINFO];
$userID = $userInfo[global_mapping::UserID];
$condidtion = '(' . global_mapping::EndDate . ' >= \'' . global_common::nowDateSQL() . '\' Or ' . global_mapping::EndDate . ' is null)';
$articles = $objArticle->getArticleByUser($userID, 1, global_common::DEFAULT_PAGE_SIZE, null, $condidtion, '');
$condidtion = global_mapping::EndDate . ' < \'' . global_common::nowDateSQL() . '\'';
$expireArticles = $objArticle->getArticleByUser($userID, 1, global_common::DEFAULT_PAGE_SIZE, null, $condidtion, '');
//print_r($articles);
}
?>
<?php
include_once 'include/_header.inc';
include_once 'include/_menu.inc';
?>
<script type="text/javascript" src="<?php
echo $_objSystem->locateJs('user_user.js');
?>
"></script>
<script type="text/javascript" src="<?php
echo $_objSystem->locateJs('user_article.js');
示例2: updateDeleteFlag
/**
* Phương thức cập nhật delete_flag
*
* @param string $ContentID ID cần cập nhập
* @param string $IDName Tên của ID cần cập nhập
* @param string $strTableName Tên table cần cập nhật
* @param int $status status của delete_flag
* @param object $objConnection connect to db
* @return int 1:Cập nhật thành công hay 0:thất bại
*
*/
public function updateDeleteFlag($ContentID, $IDName, $deletedBy, $strTableName, $status, $objConnection)
{
//const SQL_UPDATE_BY_CONDITION = "UPDATE `{0}` SET {1} WHERE {2};";
$strSQL = self::prepareQuery(self::SQL_UPDATE_BY_CONDITION, array($strTableName, 'IsDeleted=' . $status . ',' . global_mapping::DeletedBy . '=' . $deletedBy . ',' . global_mapping::DeletedDate . '=\'' . global_common::nowDateSQL() . '\'', $IDName . '=' . $ContentID));
//echo $strSQL;
if ($objConnection->executeSQL($strSQL) == -1) {
return 0;
}
return 1;
}
示例3: And
if ($catID == 0) {
$allCatIDs = '';
} else {
$allSubCats = $objArticleType->getAllArticleType(0, null, 'ParentID=' . $catID, null);
//print_r($allSubCats);
if (count($allSubCats) <= 0) {
$allCatIDs = $catID;
} else {
$allCatIDs = global_common::getArrayColumn($allSubCats, global_mapping::ArticleTypeID);
}
}
//print_r($allCatIDs);
if ($expired) {
$condidtion = ' And ' . global_mapping::EndDate . ' < \'' . global_common::nowDateSQL() . '\'';
} else {
$condidtion = ' And (' . global_mapping::EndDate . ' >= \'' . global_common::nowDateSQL() . '\' OR ' . global_mapping::EndDate . ' is null )';
}
if ($inactive == 'true') {
$condidtion .= ' And `' . global_mapping::Status . '`=0';
} else {
$condidtion .= ' And `' . global_mapping::Status . '`=1';
}
$articles = $objArticle->searchArticle($page, $allCatIDs, '', '', $condidtion, '', $total);
$_SESSION[global_common::SES_C_CUR_PAGE] = "admin/admin_article.php";
include_once 'include/_admin_header.inc';
?>
<script type="text/javascript" src="<?php
echo $_objSystem->locateJs('user_article.js');
?>
"></script>
<script type="text/javascript" src="<?php
示例4:
if ($catID == 0) {
$allCatIDs = '';
} else {
$allSubCats = $objArticleType->getAllArticleType(0, null, 'ParentID=' . $catID, null);
//print_r($allSubCats);
if (count($allSubCats) <= 0) {
$allCatIDs = $catID;
} else {
$allCatIDs = global_common::getArrayColumn($allSubCats, global_mapping::ArticleTypeID);
}
}
//print_r($allCatIDs);
if ($expired) {
$condidtion = ' And ' . global_mapping::EndDate . ' < \'' . global_common::nowDateSQL() . '\'';
} else {
$condidtion = ' And ' . global_mapping::StartDate . ' <= \'' . global_common::nowDateSQL() . '\'' . ' And ' . global_mapping::EndDate . ' >= \'' . global_common::nowDateSQL() . '\'';
}
if ($inactive == 'true') {
$condidtion .= ' And `' . global_mapping::Status . '` = 0';
} else {
$condidtion .= ' And `' . global_mapping::Status . '` = 1';
}
$articles = $objArticle->searchArticle(0, $allCatIDs, '', '', $condidtion);
$_SESSION[global_common::SES_C_CUR_PAGE] = "admin/admin_article.php";
include_once 'include/_admin_header.inc';
?>
<script type="text/javascript" src="<?php
echo $_objSystem->locateJs('user_article.js');
?>
"></script>
<script type="text/javascript" src="<?php