Forum
Topic RSS
11:14
30/01/2010
OfflineDear all,
I have problem with multi selection delete, my code works on single delete but how to delete more than 1 . Could anyone help me please, I have spent over days trying to make this work and I have not solved my problem. This is my code:
if($operation == "del")
{
$id=$_POST['id']; // the parameters show on firebug is id = 0909, 6787, 3521
$total=count($id);
for($i=0;$i<$total;$i++)
{
$query="DELETE FROM table WHERE no='$id[$i]'";
$result = $db->query($query);
}
}
Thank you very much for your help
Candra
09:33
08/03/2010
OfflineCandrairawan78 said:
Dear all,
I have problem with multi selection delete, my code works on single delete but how to delete more than 1 . Could anyone help me please, I have spent over days trying to make this work and I have not solved my problem. This is my code:
if($operation == "del")
{
$id=$_POST['id']; // the parameters show on firebug is id = 0909, 6787, 3521
$total=count($id);
for($i=0;$i<$total;$i++)
...
The contents of 'id' is not an array. It's a string. Split it into an array over ","
Most Users Ever Online: 994
Currently Online:
22 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66
Log In
Home