Re: [sqlite] [SQLITE]ignoring syntax errors during search for sth include "symbols"

2018-10-20 Thread Dan Kennedy
On 10/18/2018 04:58 PM, Maziar Parsijani wrote: Hi, how could I ignore syntax errors like this? *SELECT *,* * highlight(searchsimpleenhanced, 2, '', '') text* * FROM searchsimpleenhanced* * WHERE searchsimpleenhanced MATCH 'sth][';* You can use double quotes to search for a token that

Re: [sqlite] [SQLITE]ignoring syntax errors during search for sth include "symbols"

2018-10-18 Thread Jens Alfke
> On Oct 18, 2018, at 11:50 AM, Maziar Parsijani > wrote: > > It will crash or exit the program. You’re not handling errors correctly, then. I think you said you’re using Python? Then the query will probably throw a Python exception; you need to catch that and handle it appropriately.

Re: [sqlite] [SQLITE]ignoring syntax errors during search for sth include "symbols"

2018-10-18 Thread Peter da Silva
Don't put raw user input where code is expected. Match strongs are code. You need to encapsulate (eg escape) or filter (delete bad characters) match strings outside sqlite. On Thu., 18 Oct. 2018, 13:50 Maziar Parsijani, wrote: > It will crash or exit the program. > > On Thu, Oct 18, 2018 at

Re: [sqlite] [SQLITE]ignoring syntax errors during search for sth include "symbols"

2018-10-18 Thread Maziar Parsijani
It will crash or exit the program. On Thu, Oct 18, 2018 at 2:27 PM Jens Alfke wrote: > > > > On Oct 18, 2018, at 11:17 AM, Maziar Parsijani < > maziar.parsij...@gmail.com> wrote: > > > > I just search for words an alphabets in different languages with python > and > > my database is sqlite but

Re: [sqlite] [SQLITE]ignoring syntax errors during search for sth include "symbols"

2018-10-18 Thread Jens Alfke
> On Oct 18, 2018, at 11:17 AM, Maziar Parsijani > wrote: > > I just search for words an alphabets in different languages with python and > my database is sqlite but I need to do something to not getting error when > user input a wrong character like the ones that I told before.I can ban >

Re: [sqlite] [SQLITE]ignoring syntax errors during search for sth include "symbols"

2018-10-18 Thread Maziar Parsijani
hi, I just search for words an alphabets in different languages with python and my database is sqlite but I need to do something to not getting error when user input a wrong character like the ones that I told before.I can ban user to not input these characters but I am curious to find a way on

Re: [sqlite] [SQLITE]ignoring syntax errors during search for sth include "symbols"

2018-10-18 Thread Bob Gailer
On Oct 18, 2018 5:59 AM, "Maziar Parsijani" wrote: > > Hi, > how could I ignore syntax errors like this? > > > *SELECT *,* > > > > * highlight(searchsimpleenhanced, 2, '', '') text* > > > > * FROM searchsimpleenhanced* > > > > * WHERE searchsimpleenhanced MATCH 'sth][';* As I understand the

[sqlite] [SQLITE]ignoring syntax errors during search for sth include "symbols"

2018-10-18 Thread Maziar Parsijani
Hi, how could I ignore syntax errors like this? > *SELECT *,* > > * highlight(searchsimpleenhanced, 2, '', '') text* > > * FROM searchsimpleenhanced* > > * WHERE searchsimpleenhanced MATCH 'sth][';* > there maybe nothing to match but I don't like to get syntax errors for a symbol or character

Re: [sqlite] Ignoring "The"

2008-07-24 Thread Stephen Oberholtzer
On Wed, Jul 23, 2008 at 9:11 AM, Andrew Gatt <[EMAIL PROTECTED]> wrote: > I have a table of music artist names which i'd like to output in order. > Normally i just use: > > select * from artists order by artist_name; > > What i'd really like to do is order the artists by name but ignore any >

Re: [sqlite] Ignoring "The"

2008-07-24 Thread Chris Wedgwood
On Wed, Jul 23, 2008 at 02:11:27PM +0100, Andrew Gatt wrote: > I have a table of music artist names which i'd like to output in > order. Normally i just use: > > select * from artists order by artist_name; > > What i'd really like to do is order the artists by name but ignore > any "the" or

Re: [sqlite] Ignoring "The"

2008-07-23 Thread Griggs, Donald
Regarding: If you can't upgrade you simply need to calculate the length as well. ... then substr(artist, 5, length(artist)-4) Am I right that it's ok to simply specify a large value for the third parameter? SQLite version 3.3.12 select substr('The Quick Brown Fox', 5, 999);

Re: [sqlite] Ignoring "The"

2008-07-23 Thread Andrew Gatt
Dennis Cote wrote: > Andrew Gatt wrote: > >> Error: wrong number of arguments to function substr() >> >> I'm using sqlite 3.3.6, but i'm presuming the two and three variable >> substr functions go back further than this? Doing tests it seems to be >> the two variable version it doesn't like.

Re: [sqlite] Ignoring "The"

2008-07-23 Thread Dennis Cote
Andrew Gatt wrote: > > Error: wrong number of arguments to function substr() > > I'm using sqlite 3.3.6, but i'm presuming the two and three variable > substr functions go back further than this? Doing tests it seems to be > the two variable version it doesn't like. Do i need to upgrade my

Re: [sqlite] Ignoring "The"

2008-07-23 Thread David Bicking
On Wed, 2008-07-23 at 12:30 -0400, Igor Tandetnik wrote: > Dennis Cote <[EMAIL PROTECTED]> wrote: > > Andrew Gatt wrote: > >> I have a table of music artist names which i'd like to output in > >> order. Normally i just use: > >> > >> select * from artists order by artist_name; > >> > >> What i'd

Re: [sqlite] Ignoring "The"

2008-07-23 Thread Andrew Gatt
Dennis Cote wrote: > Andrew Gatt wrote: > >> I have a table of music artist names which i'd like to output in order. >> Normally i just use: >> >> select * from artists order by artist_name; >> >> What i'd really like to do is order the artists by name but ignore any >> "the" or "the,"

Re: [sqlite] Ignoring "The"

2008-07-23 Thread Dennis Cote
Igor Tandetnik wrote: > > Only change the order of the tests - test for 'the,' (with comma) first, > otherwise you'll never get to it. > Yes, of course. Thats what happens every time I post untested code. I should know better by now. :-) Dennis Cote

Re: [sqlite] Ignoring "The"

2008-07-23 Thread Igor Tandetnik
Dennis Cote <[EMAIL PROTECTED]> wrote: > Andrew Gatt wrote: >> I have a table of music artist names which i'd like to output in >> order. Normally i just use: >> >> select * from artists order by artist_name; >> >> What i'd really like to do is order the artists by name but ignore >> any "the" or

Re: [sqlite] Ignoring "The"

2008-07-23 Thread Greg Morphis
do std::sort(Result.begin(), Results.end(), MyCustomOperator()); > > - Sherief > >> -Original Message- >> From: [EMAIL PROTECTED] [mailto:sqlite-users- >> [EMAIL PROTECTED] On Behalf Of Andrew Gatt >> Sent: Wednesday, July 23, 2008 9:41 AM >> To: General Di

Re: [sqlite] Ignoring "The"

2008-07-23 Thread Dennis Cote
Andrew Gatt wrote: > I have a table of music artist names which i'd like to output in order. > Normally i just use: > > select * from artists order by artist_name; > > What i'd really like to do is order the artists by name but ignore any > "the" or "the," preceding it. > You could try

Re: [sqlite] Ignoring "The"

2008-07-23 Thread Sherief N. Farouk
t: Wednesday, July 23, 2008 9:41 AM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] Ignoring "The" > > > >> I have a table of music artist names which i'd like to output in > order. > >> Normally i just use: > >> > >> s

Re: [sqlite] Ignoring "The"

2008-07-23 Thread Andrew Gatt
>> I have a table of music artist names which i'd like to output in order. >> Normally i just use: >> >> select * from artists order by artist_name; >> >> What i'd really like to do is order the artists by name but ignore any >> "the" or "the," preceding it. >> >> Any ideas? >> >> Thanks >> >>

Re: [sqlite] Ignoring "The"

2008-07-23 Thread Daniel van Ham Colchete
Andrew Gatt wrote: > I have a table of music artist names which i'd like to output in order. > Normally i just use: > > select * from artists order by artist_name; > > What i'd really like to do is order the artists by name but ignore any > "the" or "the," preceding it. > > Any ideas? > > Thanks

[sqlite] Ignoring "The"

2008-07-23 Thread Andrew Gatt
I have a table of music artist names which i'd like to output in order. Normally i just use: select * from artists order by artist_name; What i'd really like to do is order the artists by name but ignore any "the" or "the," preceding it. Any ideas? Thanks Andrew