Re: Checkboxes to gather rows to delete

From: Date: Mon, 24 Feb 2003 16:13:19 +0000
Subject: Re: Checkboxes to gather rows to delete
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-25873@lists.php.net to get a copy of this message
> I appreciate all of the quick replies. I do have globals off. Currently, I > have the values for each ID being returned in a array.... Array ( [0] => > 101 [1] => 201 ) where 101 and 201 were the id's of the rows I checked. I > have to say I like the way of doing it that Mathieu has shown using the > explode function. > Thanks again. > Lewis You already have an array of IDs you want to delete. Explode is for making arrays, so what would you use it on? That doesn't make sense. $query = "DELETE FROM table WHERE rowID IN (" . implode(',',$_POST['id_array']) . ")"; is the most efficient, easiest solution, but use whatever you understand. ---John Holmes...

« previous php.db (#25873) next »