开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜