diff options
author | Arun Persaud <arun@nubati.net> | 2011-11-26 22:27:47 -0800 |
---|---|---|
committer | Arun Persaud <apersaud@lbl.gov> | 2011-11-26 22:27:47 -0800 |
commit | c1e08c52aa47aa1db8a548c5c4b9c61f62335402 (patch) | |
tree | 3202ea5e4f3418cad0b3e701b889dff427546501 | |
parent | 629e06724cde4ecd8d1e30fa04567cc1960410c5 (diff) | |
download | photo-tags-c1e08c52aa47aa1db8a548c5c4b9c61f62335402.tar.gz photo-tags-c1e08c52aa47aa1db8a548c5c4b9c61f62335402.tar.bz2 photo-tags-c1e08c52aa47aa1db8a548c5c4b9c61f62335402.zip |
fix automatic tag completion
-rw-r--r-- | getjson.php | 4 | ||||
-rw-r--r-- | 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 @@ -64,7 +64,7 @@ var count=0; /* populate data list with tags*/ d3.json("<?php echo $webbase?>/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}); }); |