2
votes

I am fire this sql query and then return this error.

My Error:

1292 Truncated incorrect DOUBLE value: '1,2,3,4,5,6,7,122,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,157,153,154,155,156' The SQL being executed was:

My Query:

DELETE FROM groups_module_actions 
WHERE module_action_id NOT IN('1,2,3,4,5,6,7,122,8,9,10,11,12,13,14,15,16,17,18,19,20,
21,22,23,24,25,26,157,153,154,155,156') AND group_id='1'
1
is that a list of number or a string? Which is it meant to be?danblack
Did you try the suggestion?Mad Dog Tannen

1 Answers

2
votes

Skip the quotes in the NOT IN (), its expecting datatype integer not a string.

DELETE FROM groups_module_actions WHERE module_action_id 
NOT IN(1,2,3,4,5,6,7,122,8,9,10,11,12,13,14,15,16,17,18,19,20,
21,22,23,24,25,26,157,153,154,155,156) 
AND group_id=1