CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Using LIKE and binding wildcard variables

 



Kurse
New User

Jan 21, 2009, 10:19 AM

Post #1 of 1 (210 views)
Using LIKE and binding wildcard variables Can't Post

Hi - I'm trying to bind variables to an SQL statement. The statement must either return all records for one given number, or many records for many numbers using a wildcard such as '%'.

If a number is provided then the statement works with '... organization_code = ? ...'

If no number is provided then the statement needs to pass only the '%' wildcard - this is where I'm stuck. I have tried ' ... organization_code like ? ... and passed '%' with no luck. I am however able to pass '352%' and it binds correctly.

I have also tried not binding anything if a number is not provided but it doesn't seem to like that because the bind is already set up to happen sometimes.

Any help is appreciated.
I'm new as well! Hello!

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives