Show
Ignore:
Timestamp:
09/24/08 04:05:05 (10 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1222229105 +0000
git-parent:

[32c816152e633534bdc3186a89f3ea92fd0b1da4]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1222229105 +0000
Message:

graph lookup and cleanup, refs #22

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • ui/web/htdocs/datapoint_search_json.php

    r362040a r52dcc3a  
    44 
    55$db = Reconnoiter_DB::GetDB(); 
    6 $rows = $db->get_datapoints($_GET['q'], $_GET['o'], $_GET['l']); 
    7 print json_encode(array( 
    8   'query' => $_GET['q'], 
    9   'offset' => $_GET['o'], 
    10   'limit' => $_GET['l'], 
    11   'results' => $rows 
    12 )); 
     6 
     7try { 
     8  print json_encode($db->get_datapoints($_GET['q'], $_GET['o'], $_GET['l'])); 
     9
     10catch(Exception $e) { 
     11  print json_encode(array( 
     12    'count' => 0, 
     13    'query' => $_GET['q'], 
     14    'offset' => $_GET['o'], 
     15    'limit' => $_GET['l'], 
     16    'error' => $e->getMessage() 
     17  )); 
     18