View Single Post
  #1 (permalink)  
Old 05-08-06, 03:10 AM
sujata_ghosh sujata_ghosh is offline
Wannabe Coder
 
Join Date: May 2006
Posts: 181
Thanks: 0
Thanked 0 Times in 0 Posts
deleting multiple records from MYSQL database using PHP

Hi!

I am trying to delete at a time multiple recodes stored in MySQL database using PHP script. the problem first i track the chosen rows using checkboxes and track those records using JavaScript and passing those to a php script, first split these values and stored each of them in each array keys and using foreach statement to delete selected rows from database generating Sql statement.

but the problem is, when i split the values which javascript passing and storing each of these split values in each key of an array. The last array key remains empty and due to that the foreach statement doesn't completed as it found a black array key with no value.

can any one please advice any solution. OR how do I delete last blank array key so that others will work fine.

OR any other idea highly appreciated.

If any one wants to see the code please let me know.

Thanks in advance.
Reply With Quote