From 1b8830e43277f70f37a592ebc2593e42174eadae Mon Sep 17 00:00:00 2001 From: Silvio Date: Tue, 23 Feb 2010 19:38:51 -0300 Subject: Fixing queryes and adding YAML support --- query.php | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/query.php b/query.php index fb0b3f6..c7adcff 100644 --- a/query.php +++ b/query.php @@ -6,6 +6,9 @@ // Import Malete Library require 'malete/php/Isis.php'; +// Import Spyc +include('spyc/spyc.php'); + ?> Query @@ -122,25 +125,34 @@ require 'malete/php/Isis.php'; 'vĂ­deo' => 902, ); - $fdt = $fdt_tupi; + $fdt = $fdt_anu10; + $yaml = Spyc::YAMLDump($fdt); ?>

server

srv->sock) { echo "could not contact server\n"; } else { - print_r($db); + //print_r($db); +?> + +

number of records...

+ +num_recs($query); + echo "got ",count($recs), " terms for '$query'
\n"; ?>

terms beginning with...

terms($query); + $query = 'Hora'; + $terms = $db->terms(strtoupper($query)); echo "got ",count($terms), " terms for '$query'
\n"; foreach ($terms as $t) { list($cnt, $term) = explode("\t", $t); @@ -153,7 +165,7 @@ require 'malete/php/Isis.php'; query($query); + $recs = $db->query(strtoupper($query)); echo "got ",count($recs), " records for '$query'
\n"; foreach ($recs as $r) { echo "
---\n", $r->toString(), "---\n
\n"; -- cgit v1.2.3