On Fri, Feb 13, 2009 at 4:36 AM, aalap shah <aalap....@gmail.com> wrote:
> Hi,
>
> I am using sqlite3 for my search application and i want an optimized
> way for retrieving values from table. I need a way in which I can
> query records from the result of previous query based on next search
> character.
> so for example
> If i search for words starting with "a" then if user enters "b" then i
> want to search for words starting with "ab" from the ones that were
> retrieved in my last query .

if you have your table indexed on the search column, the database
already provides an "optimized way for retrieving values from table."
After all, that is why you are using a database in the first place.

What you want to do is like the so called Microsoft Intellisense or
Google Suggestions kind of behavior. The easiest way is to do it in
your application. Just pull in an array of search results for words
starting with 'a' and then narrow down based on the next key pressed.
Otherwise, just call separate queries... first LIKE 'a%' then LIKE
'ab%' and so on.

>
> Can any one help me with this. It would be really helpful to me.
> Thank You in Advance
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to