Issues with deleting multiple records
Issues with deleting multiple records
User Management page, delete a single record I have mastered it now, but how can I delete more than one record at a time?
I know how to use loops, but how do I get the ID of the selected records?
Which Big Brother help me write down the complete code ...
My Code:
PHP Code
------Solution--------------------
The usual deletion is to put all the IDs in an array such as s[], which is where multiple id,checkbox,value are
The ID of each record,
Common one name s[], if you choose which submission form is an array ah, then $expr = Join (",", $_post[' s ']);
This executes when delete from table where ID in ($expr)
You can do it.
------Solution--------------------
After submission:
PHP Code
$wyx _id=$_post[' wyx_id '];foreach ($wyx _id as $value) {$sql = "delete from table where id= $value";} That's OK.
------Solution--------------------
Post used to be
$ids [0]=id1;
$ids [1]=id2; This form, the upstairs has been said to be very clear.
------Solution--------------------
Many of the main use of conditional statements to control.
For example, ID in ..., or ID > ... or ID not in ...
Wait a minute.