java - how to fix error on -


i have sql request

delete bc_udv3_roles  permission_id = 'x' or       0 < (select * bc_udv3_roles             "substr"(permission_id, 0, 1)='d')  or '1'='1' 

when execute error

please help, how can fix it?

delete bc_udv3_roles permission_id = 'x' or 0 < (select count(*) bc_udv3_roles substring(permission_id, 1, 1)='d') 

or '1'='1' condition evaluates true. not needed.

also if using mysql function should substring instead of substr. there should no quotes around function name. can't compare 0 columns in table. use count(*) instead.

alternately can try

delete bc_udv3_roles permission_id = 'x' or substring(permission_id, 1, 1)='d' 

Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -