need help deleting multiple records -

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • cool_dude7244@yahoo.com

    need help deleting multiple records -

    I am retrieving records for Customer ID as follows and displaying them
    as table rows with a checkbox for multiple deletion.

    Part of a </FORM>
    *************** *************** *************** *************** ****
    $recordset=Arra y();
    $c=0;
    while (ora_fetch_into ($cursor,$recor dset,ORA_FETCHI NTO_NULLS|
    ORA_FETCHINTO_A SSOC))
    {
    echo "<TR>".
    "<TD><INPUT TYPE=Checkbox name=No[ ] Value=".$c."></TD>".
    "<TD>".$records et["CUSTID"]."</TD>".
    "<TD>".$records et["TITLE"]."</TD>".
    "</TR>";
    $c=$c+1;
    }
    *************** *************** *************** *************** *****

    I am quite confused what should be my query string in the submit file.
    I want to delete matching Customer IDs in the table from the checked
    records. Please suggest how I can frame the query. I am currently able
    to delete just one record.

    -CD

  • cool_dude7244@yahoo.com

    #2
    Re: need help deleting multiple records -

    I am trying
    print $HTTP_POST_VARS['No'];
    to see what the array contains but getting Undefined index: No as an
    error message.

    Comment

    • Geoff Berrow

      #3
      Re: need help deleting multiple records -

      I noticed that Message-ID:
      <1114223367.522 784.75290@o13g2 000cwo.googlegr oups.com> from
      cool_dude7244@y ahoo.com contained the following:
      [color=blue]
      > $c=0;
      > while (ora_fetch_into ($cursor,$recor dset,ORA_FETCHI NTO_NULLS|
      >ORA_FETCHINTO_ ASSOC))
      > {
      > echo "<TR>".
      > "<TD><INPUT TYPE=Checkbox name=No[ ] Value=".$c."></TD>".[/color]

      I don't know about the query string but I suggest you look at the html
      first.

      <TD><INPUT TYPE=Checkbox name='No[ ]' Value='".$c."'> </TD>".

      And shouldn't the value be the id?

      <TD><INPUT TYPE=Checkbox name='No[ ]'
      Value='".$recor dset["CUSTID"]."'></TD>".

      Then try a print_r ($_POST['No']); and see what you get.




      --
      Geoff Berrow (put thecat out to email)
      It's only Usenet, no one dies.
      My opinions, not the committee's, mine.
      Simple RFDs http://www.ckdog.co.uk/rfdmaker/

      Comment

      Working...