阅读背景:

如何在postgres中转义字符串,如sql语句?

来源:互联网 

I am using Rails for a project with postgresql as the underlying database. I have a search form that needs a few modifications. Specifically, I need to ensure that if some one type in something like 'drop table allusers', I don't have a disaster on my hands. IS there anyway I can restrict the dearch to one table only and ensure that searching for something like "drop table allusers" doesn't drop the table but just return results?I am using Rails for a project with postgresql




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: