当前位置: 首页>>代码示例>>PHP>>正文


PHP DatabaseConnection::isChildAvailable方法代码示例

本文整理汇总了PHP中DatabaseConnection::isChildAvailable方法的典型用法代码示例。如果您正苦于以下问题:PHP DatabaseConnection::isChildAvailable方法的具体用法?PHP DatabaseConnection::isChildAvailable怎么用?PHP DatabaseConnection::isChildAvailable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DatabaseConnection的用法示例。


在下文中一共展示了DatabaseConnection::isChildAvailable方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: DatabaseConnection

<?php

/**
 * Created by PhpStorm.
 * User: poovarasanv
 * Date: 02-11-2015
 * Time: 09:47
 */
require "DatabaseConnection.php";
$db = new DatabaseConnection();
$db->createConnection();
$parent = $_GET['parent'];
$type = $_GET['type'];
$sql = "SELECT *\n            FROM artefact\n            WHERE ArtefactPID = '{$parent}' AND VisibleStatus='on' ORDER BY CreatedDate DESC";
//echo $sql;
$result = $db->setQuery($sql);
$resultArray = array();
if ($result->num_rows > 0) {
    while ($row = $result->fetch_assoc()) {
        $temp["title"] = $row['ArtefactName'];
        $temp["key"] = $row['ArtefactCode'];
        if ($db->isChildAvailable($row['ArtefactName'])) {
            $temp['lazy'] = true;
            $temp['folder'] = true;
        }
        array_push($resultArray, $temp);
    }
    echo json_encode($resultArray);
} else {
    return null;
}
开发者ID:jaisabari,项目名称:globalArchivev2,代码行数:31,代码来源:treesubdata.php

示例2: DatabaseConnection

 * Time: 10:05
 */
ini_set('max_execution_time', 30000);
include_once 'DatabaseConnection.php';
$type = $_GET['type'];
session_start();
$_SESSION['type'] = $type;
$db = new DatabaseConnection();
$conn = $db->createConnection();
$parentArray = array();
//Associate Array with ArtefactCode and ArtefactPID
$sql = "SELECT\n            artefactname,\n            artefactcode\n          FROM artefact\n          WHERE artefactPID IS NULL AND artefactTypeCode = '{$type}' AND visiblestatus = 'on'\n          ORDER BY CreatedDate DESC";
//echo $sql;
$result = $db->setQuery($sql);
if ($result->num_rows > 0) {
    while ($row = $result->fetch_assoc()) {
        $temp['title'] = $row['artefactname'];
        $temp['key'] = $row['artefactcode'];
        if ($db->isChildAvailable($row['artefactname']) > 0) {
            $temp['lazy'] = true;
            $temp['folder'] = true;
            // $temp['cc'] = $db->isChildAvailable($row['artefactname']);
        }
        array_push($parentArray, $temp);
    }
    //echo "<pre>";
    //print_r($parentArray);
    echo json_encode($parentArray);
} else {
    return null;
}
开发者ID:jaisabari,项目名称:globalArchivev2,代码行数:31,代码来源:treeform1.php


注:本文中的DatabaseConnection::isChildAvailable方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。