Forum

July 12th, 2025
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Coding to catch id from multi select delete
25/04/2010
11:14
Avatar
Candrairawan78
Indonesia
Member
Members
Forum Posts: 39
Member Since:
30/01/2010
sp_UserOfflineSmall Offline

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++)

  {

  $query="DELETE FROM table WHERE no='$id[$i]'";

  $result = $db->query($query);

  }

  }

Thank you very much for your help

Candra

26/04/2010
09:33
Avatar
ddotsenko
Member
Members
Forum Posts: 15
Member Since:
08/03/2010
sp_UserOfflineSmall Offline

Candrairawan78 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 ","

27/04/2010
08:30
Avatar
Candrairawan78
Indonesia
Member
Members
Forum Posts: 39
Member Since:
30/01/2010
sp_UserOfflineSmall Offline

Dear ddotsenko,

Thank you for your clue. my grid has solved.

Regards,

candrairawan78

Forum Timezone: Europe/Sofia

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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information