iSeries Stored Procedure Help

Brandon Stout bms at
Thu Jan 25 14:09:10 MST 2007

Daniel wrote:

> we are using the native db2 database on the iSeries.  If we use
> '%term%' hardcoded in the query it works, but if we use a variable to
> be used in stead of term it complains about the %.
> -Daniel

I'm not sure how to do this on the database side, and since you
mentioned stored procedures, that's probably where you are doing the
variable, but you should be able to do this with php:

$sql = <<<str
SELECT * FROM t1 WHERE c1 LIKE "%{$var}%"

More information about the PLUG mailing list