开发者

firebird: how to use '%' in where clause?

开发者 https://www.devze.com 2023-01-26 20:27 出处:网络
dear all.i\'m familiar with MySQL but not in Firebird. i try to search some particular data inside DB.But after i try to use \'%\' in where cluse i get some error message:

dear all. i'm familiar with MySQL but not in Firebird.

i try to search some particular data inside DB.But after i try to use '%' in where cluse i get some error message:

Dynamic SQL Error SQL error code = -104 Token unknown - line 3, column 43 %

this my script:

$ssWhere .= " PROD_DATE LIKE ''%".$_POST['sSearch_8']."%'' ";

whether i cant use '%' in where clause 开发者_Python百科in firebird?


I think you need to specify single quote once:

$ssWhere .= " PROD_DATE LIKE '%".$_POST['sSearch_8']."%' ";


Try:

SELECT a.* FROM tablea a WHERE a.fieldname LIKE 'A%'

0

精彩评论

暂无评论...
验证码 换一张
取 消