Exemplo n.º 1
0
function getDomainNodesAndTheirPatternCounts()
{
    $result = getAllDomainNodes();
    $list = array();
    while ($row = mysql_fetch_array($result)) {
        $tempList = array();
        $linksArray = getLinksArrayByNid($row['nid']);
        $count = 0;
        foreach ($linksArray as $key => $value) {
            if (!isDomainNode($value)) {
                $count++;
            }
        }
        array_push($tempList, $row);
        array_push($tempList, $count);
        array_push($list, $tempList);
    }
    return $list;
}
Exemplo n.º 2
0
<?php

include_once "../dao/getNode.php";
$result = getAllDomainNodes();
$list = array();
while ($row = mysql_fetch_array($result)) {
    array_push($list, $row);
}
echo json_encode($list);