I'm using CODEIGNITER framework.
My situation is this. I have a list of data. The user selects which record to delete (through checkboxes). I have to do it in ajax because my client doesn't want to see the system refreshing. I've successfully transferred the data through JSON.
Now, my problem is, in the server side, I don't know how to populate the array with the dynamic record (the array is what I will use to delete the records in the database).
I have a solution but I'm not sure if this is a good programming practice.
My solution is this:
delete the records one by one with a loop.
I think it's inefficient but what do you guys think? Please give me a strategy.