还应该给条件加个"就安全了。
如select * from table_name where id="1 or 1=1";这样子就好点。