I believe you have to you use it like this:

$q = qq |select * from x where y LIKE ?|;

upper casing the LIKE.

HTH,
Sam Gold

-----Original Message-----
From: Thomas Good [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 28, 2003 12:32 PM
To: DBI Users
Subject: LIKE and Variable Binding


Hi, how does one use LIKE and a wildcard with variable binding??

$q = qq |select * from x where y like ?|;
...
$sth->execute($some_variable)

where does the % go??

TIA!

-----------------------------------------------------------------------
Thomas Good                                  e-mail: [EMAIL PROTECTED]
Programmer/Analyst                           phone:   (+1) 718.818.5528
Residential Services                         fax:     (+1) 718.818.5056
Behavioral Health Services, SVCMC-NY         mobile:  (+1) 917.282.7359

// Das ist die Kunst - wie man alles verhunzt.



Reply via email to