Skip to content

Commit

Permalink
Fixes #44. English name search now only shows the first instance of t…
Browse files Browse the repository at this point in the history
…he matching items.
  • Loading branch information
dryror committed Jun 25, 2014
1 parent f1b96c8 commit 53b8092
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/addPlotObservation.js
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ function auto_complete(search_term) {
var rsGenus = db.execute('SELECT genus_name FROM genus WHERE UPPER(genus_name) LIKE UPPER(?)', search_term + '%');
totalRowCount += rsGenus.getRowCount();

var rsEnglish = db.execute('SELECT english_name ' + 'FROM species ' + 'WHERE UPPER(english_name) LIKE UPPER(?)', search_term + '%');
var rsEnglish = db.execute('SELECT DISTINCT english_name ' + 'FROM species ' + 'WHERE UPPER(english_name) LIKE UPPER(?)', search_term + '%');
totalRowCount += rsEnglish.getRowCount();

var rsScientific = db.execute('SELECT s.species_code, g.genus_name || " " || s.species_name AS scientific_name \
Expand Down

0 comments on commit 53b8092

Please sign in to comment.