mysql - how to fix sql query error -


i have request

 delete t1 permission_id = 'x' ,   0<(select * t2 "substr"(pid,1,1)=1)  or '1'='1' 

but got

the sql statement " delete t1 permission_id = 'x'  , 0<(select * t2 substr(pid,1,1)=1)  or '1'='1'"  contains syntax error[s]: - 1:101 - sql syntax error: token  "(" not expected here 

please help, how can fix it?


update remove "substr" substr, sql statement

delete t1  permission_id = 'x'  , 0= (select * t2 substr(pid,1,1)=1)  or '1'='1' 

contains syntax error[s]: - 1:99 - sql syntax error: token "(" not expected here


update 2

i change

select count(*) t2 substring("asdqweasd",1,1)) 

and - sql syntax error: token "," not expected here - expecting "from", found ','

you not need double quotes around substr. can not use select * . use count(*)

delete t1 permission_id = 'x' ,   0<(select count(*) t2 substr(pid,1,1)=1)  or '1'='1' 

Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

c# - two queries in same method -