Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: question about a search
Thanks for your help.
Matt
"John Russell" <netnews9_at_johnrussell.mailshell.com> wrote in message
news:orq7905e53t4tnehrejo8dtgk4obos045r_at_4ax.com...
> >Matt wrote:
> >
> >> I'm creating PSP pages.
> >>
> >> I have a page where a user can enter a search term, and two radio
buttons to
> >> select whether they would like to search the name field, or the
description
> >> field.
> >>
> >> So, I created a cursor like this:
> >>
> >> <%!cursor game_cursor is
> >> select *
> >> from video_game
> >> where search_area LIKE '%&search_terms%';%>
>
> You have to concatenate the variable into a longer string, otherwise
> you are just searching for something that actually contains the string
> 'search terms':
>
> where search_area LIKE '%' || search_terms || '%';%>
>
> & is meaningless in this context. Maybe you're thinking of the
> substitution character in SQL*Plus?
>
> John
> --
> Photo gallery: http://www.pbase.com/john_russell/
Received on Sat May 01 2004 - 21:02:24 CDT
![]() |
![]() |