From c1e08c52aa47aa1db8a548c5c4b9c61f62335402 Mon Sep 17 00:00:00 2001 From: Arun Persaud Date: Sat, 26 Nov 2011 22:27:47 -0800 Subject: fix automatic tag completion --- getjson.php | 4 ++-- index.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/getjson.php b/getjson.php index 0288646..14af09b 100644 --- a/getjson.php +++ b/getjson.php @@ -20,8 +20,8 @@ if (isset($_REQUEST["S"])) { /* single tag or part of tag */ $tag = sqlite_escape_string($_REQUEST["S"]); - /* individual tags are separated by '+' */ - $result = $DB->query("SELECT name FROM tags where name like \"%$tag%\""); + + $result = $DB->query("SELECT name FROM tags"); $count = $DB->query("SELECT 1"); } else diff --git a/index.php b/index.php index a6112ab..e5131db 100644 --- a/index.php +++ b/index.php @@ -64,7 +64,7 @@ var count=0; /* populate data list with tags*/ d3.json("/getjson.php?S", function(json) { - d3.select("#MyTags").selectAll("option").data(json) + d3.select("#MyTags").selectAll("option").data(json[1]) .enter().append("option").attr("value",function(d) {return d.name}); }); -- cgit v1.2.3-18-g5258