hi all!
coding a database search program on web,
i want to have that pg to find tuples including
the string that a user inputs.
how can i do?
Does Postgres supply built-in function such like strstr()
in C ?
I'm wating you.
------------------------------------------------------
Yoon-young Lee from Korea
~~m..m~~
ÀÌÀ±¿µ writes:
> hi all!
> coding a database search program on web,
> i want to have that pg to find tuples including
> the string that a user inputs.
> how can i do?
> Does Postgres supply built-in function such like strstr()
> in C ?
> I'm wating you.
> ------------------------------------------------------
> Yoon-young Lee from Korea
> ~~m..m~~
You can use the SQL "like" operator and do something like:
select *
from table
where field like '%somestring%'
The "%" == zero or more of any character.
Jonathan
--
Jonathan H. Wheaton
jwheaton@applink.net
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера