Hebrew in Raw Query Like Clause

2016-07-08 Thread Art Zemon
Hello, I have a column in a table that contains Hebrew text. I need to do a query with a LIKE clause on the Hebrew text. The query works if I execute the SQL directly, either in a SQL window of phpMyAdmin or in a command line mysql client. But I cannot get it to work within Django. I tried Bible.

Re: Hebrew in Raw Query Like Clause

2016-07-08 Thread Michal Petrucha
On Thu, Jul 07, 2016 at 11:23:21PM -0500, Art Zemon wrote: > Hello, > > I have a column in a table that contains Hebrew text. I need to do a query > with a LIKE clause on the Hebrew text. The query works if I execute the SQL > directly, either in a SQL window of phpMyAdmin or in a command line mys

Re: Hebrew in Raw Query Like Clause

2016-07-08 Thread Art Zemon
On Friday, July 8, 2016 at 8:34:00 AM UTC-5, Michal Petrucha wrote: > > I may be wrong, but it seems to me that you're using wrong quoting in > that raw query; I think it should be:: > > select sortkey, book, chapter, verse, hebrew_text > from bible_bible > where hebrew_text like

Re: Hebrew in Raw Query Like Clause

2016-07-08 Thread Art Zemon
Michal, Actually, your syntax didn't quite work. It threw a couple of warnings and seemed to match all records in the database. But you got me on the right track. This syntax does work properly: select ... where word like concat('%%', %s, '%%') Thanks for getting me pointed in the right direc