Re: select exact term

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: select exact term
Дата
Msg-id 22453.1364501219@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: select exact term  (Marc Fromm <Marc.Fromm@wwu.edu>)
Ответы Re: select exact term
Список pgsql-admin
Marc Fromm <Marc.Fromm@wwu.edu> writes:
> I am struggling with the syntax. In php I create my where clause as shown, using ~* for case insensitive:
> $search = "art";
> $strSQL2 = "WHERE (title ~* [[:<:]]'$search'[[:>:]] OR description ~* [[:<:]]'$search'[[:>:]]) ";

> When executed zero records are returned even though the ILIKE statement shown below returns records that do have the
wordart. 

Your php app must not be bothering to check for errors :-( ... that's
invalid SQL syntax.  The bracket constructs are part of the regexp
string and need to be inside the single quotes.

            regards, tom lane


В списке pgsql-admin по дате отправления:

Предыдущее
От: Marc Fromm
Дата:
Сообщение: Re: select exact term
Следующее
От: Marc Fromm
Дата:
Сообщение: Re: select exact term