I am using a row selector in a table, and am selecting table entries into an array created with the default checkbox name gcb[]. Let's say the underlying table is tablex
Each entry in the gcb[] array is the aid of a record in the table, so there may be any number of entries in the array, from none to many. An example array might be, where 4 entries have been selected in the form table:
For each value in gcb[]
DELETE * from tablex WHERE aid = val(gcb[]);
I think I should be using the IN operator, but have no idea how to set the value of the DELETE condition.
Many thanks in advance for any offers on this!
Each entry in the gcb[] array is the aid of a record in the table, so there may be any number of entries in the array, from none to many. An example array might be, where 4 entries have been selected in the form table:
[gcb] => Array ( [0] => 4 [1] => 9 [2] => 10 [3] => 11 )Now I'd like to delete the 4 (in this case) records from tablex, so I am using a Delete action. Does anybody know please how to set up the WHERE clause to do something like this logic?
For each value in gcb[]
DELETE * from tablex WHERE aid = val(gcb[]);
I think I should be using the IN operator, but have no idea how to set the value of the DELETE condition.
Many thanks in advance for any offers on this!