From 25299a08fc7cf9b8955c8a6bab1bebf6aa036fbe Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Mon, 5 Nov 2007 11:36:30 +0200 Subject: [PATCH] Look in postal_code when searching with a string --- src/poi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/poi.c b/src/poi.c index d4fdef1..8b1ce81 100644 --- a/src/poi.c +++ b/src/poi.c @@ -251,7 +251,7 @@ poi_db_prepare(sqlite3 *db) " from poi p, category c " " where p.lat between ? and ? " " and p.lon between ? and ? " - " and c.enabled=1 and p.cat_id = c.cat_id and p.label like ? order by p.label, c.label", + " and c.enabled=1 and p.cat_id = c.cat_id and (p.label like $NAME or p.postal_code like $NAME) order by p.label, c.label", -1, &poisql.select_poi_search, NULL)!=SQLITE_OK) return FALSE; @@ -262,7 +262,7 @@ poi_db_prepare(sqlite3 *db) " from poi p, category c " " where p.lat between ? and ? " " and p.lon between ? and ? " - " and c.enabled=1 and p.cat_id = c.cat_id and p.label like ? and c.cat_id = ? order by p.label", + " and c.enabled=1 and p.cat_id = c.cat_id and (p.label like $NAME or p.postal_code like $NAME) and c.cat_id = ? order by p.label", -1, &poisql.select_poi_search_cat, NULL)!=SQLITE_OK) return FALSE; -- 2.39.5