PHP - delete multiple records in the database by using the checkboxes?

It took zillions of times over the years, BUT my Google search has been exhausted. I can't find a coherent tutorial or explanation on how to do this.

Someone else has a link to a tutorial?

I found and implemented, with a few tweaks, which updates several records of price field. Most likely the removal works in a similar way, by making a loop on all records, but can't get my head around it for the moment.

See you soon

Operating system.

OK, even once, the warning I ever wrote a single php page. But try this.

Once again, use it for your form fields in the repeat region.

and for your delete statement

{foreach ($_POST ['action'] as $dayID)}

$query = 'DELETE days WHERE the dayID = $dayID;

mysql_query ($Query) or die ("' error in query: $query '");

}

> The data type for the field of dayID is int, is the primary car key.

FYI - given that the data type is numeric, you do not need to pack quotes around it.

Tags: Dreamweaver

Similar Questions

  • Delete multiple records in the table...

    Hello

    I have a table with 720 000 records, I want to delete records for the date of joining i, e for 20/10/2008. To this date there 1065 records. can I use a simple delete for this statement?

    Delete from Test where Join_date = 20 October 2008 ';

    Is this is a good way to do it? Any suggestion splease.


    Thank you!!

    Hello

    user642297 wrote:
    Hello

    I have a table with 720 000 records, I want to delete records for the date of joining i, e for 20/10/2008. To this date there 1065 records. can I use a simple delete for this statement?

    Delete from Test where Join_date = 20 October 2008 ';

    Is this is a good way to do it? Any suggestion splease.

    Thank you!!

    Yes, you can use statements like this to delete several lines at once.

    Remember that all DATEs include a time. The statement you posted only deletes the lines dated at midnight (that is, 20 October 2008 00:00:00).
    To remove all the same day, regardless of the time, say

    WHERE   Join_date >= TO_DATE ('20-oct-2008', 'dd-mon-yyyy')
      AND   Join_date <  TO_DATE ('21-oct-2008', 'dd-mon-yyyy')
    

    If encoding time is more valuable than the run time, one could also say:

    WHERE   TRUNC (Join_date) = TO_DATE ('20-oct-2008', 'dd-mon-yyyy')
    
  • Insert multiple records in a database using the DB adapter and stored procedure

    Hi all

    I want to insert multiple records in a database using a stored procedure. I wanted to insert these records using a data adapter and data adapter must be called by a mediator.

    Can anyone suggest me some ideas if it's possible with capabtilities OOB in SOA suite or not?

    Thank you for your help in advance.

    Thank you
    Shiv

    The trick is in the stored procedure. You must use a data type that will handle multiple records I use varray. An example can be found in this post.

    Re: Mutiple calls to AppsAdapter (pl/sql) when the payload has multiple records

    When you read the procedure stored in the db adapter wizard looks and xsd / xml if you have maps accordingly.

    see you soon
    James

  • Delete multiple rows in the table.

    How to remove several rows in the table at the same time?

    I have a table with 10 rows.

    I have a loop for delete lines 1, 3 and 6.

    It deletes the row 1 and 3 of the Index out of Bounds exception.

    I know why this is happening.

    I'm looking for a function or something to delete several lines at once?

    Thank you

    It must be a logic error.

    For each row, you delete, you should reduce the number of indexes.

    For example

    If you want to delete lines 1, 3 and 6 of a table that contains 6 rows

    Remove row1 as Table.Row [0].instanceManager.removeInstance ();    [now how many lines will become 5]

    Remove row3 as Table.Row [1].instanceManager.removeInstance ();     [Note that index is 1 because you have already deleted a record, and the index starts at 0.

    Remove row6 as Table.Row [3].instanceManager.removeinstance ();      [already two deleted record, so 6-2-1 = 3 is your index to remove]

    You understand the logic?

    Nith

  • How can I change the optimization of the record to multiple records at the same time?

    Hello world

    I have a ton of TV shows torn on my computer of my DVD collection and organized with several files, like this:

    TV shows > the name of the slide show > season XX

    So in the case of television broadcasts, I have a folder for each show. Then, within each folder of the show, I have a folder for each season, records for the images of the actor, as well as images and art show. Then, in each case of the season, I NFO with metadata files and video files themselves, as well as screenshots from each episode. I want to do is have each season should be optimized for video, but senior records (TV Shows and Name of Show) to the difference. So far, the only way I found to do this is to go to the properties of each folder and manually set. Is it possible to change the type of folder all files with XX season are the same, without changing the records above them?

    Take a look at this, I recorded a short video demonstration of how do.  It is not really intuitive, but once you know how you can get it done.  Apply the Styles folder to all subfolders [Video]

  • Delete a Multiple record in the database block

    Hi all,

    I have only one button. what I want if I press this button, all of the records that I selected blocks of retail is deleted.

    I used this code, but I always got an error message: FRM-40102: account must be entered or deleted first.

    DECLARE
    Num_Total_Records NUMBER;
    Num_Loop_I NUMBER;
    BEGIN

    GO_BLOCK (< BLOCK_NAME >);
    PREMIER_ENREGISTREMENT;
    LAST_RECORD;
    Num_Total_Records: = TO_NUMBER (NAME_IN('SYSTEM.) CURSOR_RECORD'));
    PREMIER_ENREGISTREMENT;
    FOR Num_Loop_I IN 1.Num_Total_Records LOOP
    IF < BOX > = 1 THEN
    If < condition > then
    on the other
    If < condition > then
    on the other
    end if
    -condition is satisfied... remove the selected record
    delete_record;
    commit;
    end if
    END IF;
    NEXT_RECORD;
    END LOOP;
    <................................................>
    END;

    Baguhan Hai,

    Try this Code.

    DECLARE
    Num_Total_Records NUMBER;
    Num_Loop_I NUMBER;
    BEGIN

    GO_BLOCK ();
    PREMIER_ENREGISTREMENT;
    LAST_RECORD;
    Num_Total_Records: = TO_NUMBER (NAME_IN('SYSTEM.) CURSOR_RECORD'));

    -----------------------------------------------------
    change this part only

    FOR Num_Loop_I IN REVERSE 1.Num_Total_Records LOOP
    IF = 1 THEN
    delete_record;
    on the other
    PREVIOUS_RECORD;
    end if;
    ----------------------------------------------------

    END LOOP;
    commit;
    END;

    Kind regards

    Manu.

  • Insert multiple records in the single form

    Hi all

    I met already insert many rows into a table using ADF BC. The solution is in the following thread

    Re: How to create several new lines in the Table of the ADF?

    However,.
    The above solution is useful when you want to enter new values as well as all the table entries is displayed.
    What can I do if I don't want all values in the table, but just a page 'AddEntries' where I can only add new lines without going through the table entries is displayed.

    As,

    Say a form has 5 rows

    Each line has empId, eMailSlNo, send attributes

    EmpId is the same for all 5 recordings but emailId is different.

    EmpId eMailSlNo plus the PK.

    empId generated by the sequence.

    Now, on presentation of the form, I want all five records to be inserted.

    (can I use ADF form instead of the table of the ADF for the ViewObject in this case. I tried ADF form but I could only insert 1 plug at the same time).

    I use 10.1.3.4

    Help, please.

    Thanks in advance,
    Shri

    Published by: newtoOTN on December 29, 2009 18:02

    Shri salvation,

    ADF form is intended for the single insert/update. For multiple insert/update/delete using the collection as table UI is preferred. I guess your db table or table design INTERFACE default (in my opinion but I do not know your usecase entirely, so I guess might b wrong).

    I would say,

    -make EmpId as PK
    -have another table to store EmpId (foreign key), emailSiNo, email
    -Having the relationship of the master / detail between the British Colombia ADF db tables.
    -Create master / detail UI and on the selection of the master, view the details and if no record is found does not add files and commit.

    See these examples:
    http://www.Oracle.com/technology/products/jdev/tips/Mills/MasterDetailSync/Master_Detail_Synchronization_in_ADF_Faces.html
    http://andrejusb.blogspot.com/2007/06/create-edit-and-delete-operations-in.html

    Hope it makes sense.

    ~ K

  • [ADF, JDev 12.1.3] How to display multiple records on the same page... not in a table but they appear a form for each record

    Hallo,

    I need to create a page that displays the records of a VO, but I would not use a table.

    Instead, I would like to display a form for each record to be displayed.

    Forms must appear one above the other and each form should have 2 buttons: one to remove the file/form itself and one to add a new file/form.

    When you press the button Add a new empty form should be dynamically added to the page (so that the user can fill) and created related record.

    When REMOVE button is pressed the form (which contains the operated button) should be disappear and the record shuould be deleted.

    Creations and destruction must be applied only if the user clicks a button on CONFIRMATION / COMMIT.

    Maybe this http://digilander.libero.it/flattit82/OTN_FILES/MultiFormPage.png picture can help to understand what I want to do.

    You kindly help me?

    Thank you

    Federico

    Hi Federico

    I was saying that your page layout can be achieved using af: table

    See this image:

    This provision is af:table (I think same as yours), just add a column in the table and put all the fields in this column then correct layout allows to design as a provision on the form or group layouts

    I'm not saying it's the best approach, but you can try this

    Thank you

  • How to delete a record in the data store VMware

    Hello

    First VM4 & VM5 is migrated during the execution of the migration of the VM20, sort of migration of VM4 & VM5 failed a few minutes later. But VM4 folder could be seen under backup2 datastore. When VM4 is migrated again once finished VM20 migration, VM4_1 record can be seen in the data backup2 store.  And VM4 folder includes a DB_backup - flat hard file.

    vm4-2.jpg

    So I have a few questions:

    (1) how can I remove the VM4 because it's useless?  Should I delete file DB_backup - flat hard and then delete the folder VM4? But I can't find measures to remove the VM4 folder in the store of data backup2. Who can provide the steps?

    (2) how can I rename the folder VM4_1 to VM4 name?

    Thank you!

    Thanks Andre for clarification. Yes, even if the file can be renamed when the VM is turned on but this will lead to issues if we want to migrate the virtual computer to the another data store or if we stop & try to turn on. So please do not rename folder when the virtual machine is running.

    Second approach will work fine.  Renaming that is to display the name of the computer virtual, then SVMotion in another data store & and then you can bring the virtual machine to the previous data store.

    Reference:VMware KB: rename a virtual machine and VMware ESXi and ESX records

  • Do find/replace multiple records at the same time?

    Hello

    I wonder if there is a way to apply the options find/replace, I select all the records that I have given merged in my InDesign file.

    Reserved spaces will not import my database spaces, example if I

    Model InDesign: < < bird > >

    < < beak > > < < beak value > >

    .csv:                              bird's beak,,, value of beak

    Eagle, beak:, Hung

    I get

    InDesign after the merger of data: Eagle

    beak: hung

    No spaces came with the merger.  If there is an option to preserve the spaces, it would be the simplest solution. However, I'm not finding such a command, so I would like to add a special character after my colon in the .csv and then use ID to find/replace this character in each of my files in a space or two.  Any ideas?

    Thank you.

    Edit: even on a single record, find/replace is not applied to my output document, either... Its release the special character that I wrote in the fields of .csv instead of space, it is supposed to transform.

    Post edited by: EX_Achilles

    Yes.

    Make sure that you set the scope of the search and replace of the Document. He may have missed the selection or history.

  • How can I delete multiple substitutions at the same time?

    I have hundreds of text items that are related to a paragraph style. Somehow, I accidentally changed the font on most of the objects (style always sets the correct font). Now, most of the text objects that use this style have an asterisk in the paragraph Styles Panel. I know how to clear the substitution on one object by object (i.e., reapply the paragraph style or choose clear overrides), but is it possible to do hundreds of objects (which are spread over different layers)? I thought that Select | Even | Appearance would work, but it selects objects with different paragraph styles. I was hoping that I could select all the objects and choose clear overrides, but the command is active only when an object is selected. I hope that now I don't have to go through each object one at a time...

    Thank you!

    It would be beneficial that it worked that way, but it's not. As soon as several text items or different paragraphs are selected, the command replace clear is not available. In addition, the shortcut Ctrl-Alt comply here.

    However, there is a somewhat hidden flaw:

    1. turn highlighted a paragraph which contains at least a substitution.

    2. in the actions palette, start to register a new action.

    3. go to the paragraph Styles palette menu, and run the command erase replacements.

    4. stop recording the action.

    Now select any number of text objects involving some replacements of different style and apply action. All replacements will be deleted.

    Is no consistent behaviour, of course.

  • Smartphones blackBerry - need to delete multiple records

    I'm not sure how they appeared there, but when I go to my email or SMS icon and view folders, there are several files to an e-mail address that I DON'T have connected with my Blackberry. At the same time, I tried to sync my email to work with my phone, but later decided not to do so.

    Since I got a new BB and transferred my old stuff for my new phone (the files have never been there before), now all my Outlook folders appear in the folder view, but there are no messages in them.

    How can I get rid of these?

    To remove the multiple Outlook folders:

    Open the Blackberry Desktop Manager

    Connect the device via USB

    Go to the backup and restore

    Go to advanced

    In the box on the right look for FOLDERS and clear

    Synchronization again.

    Thank you

  • Delete a record IN the archives folder

    I have a particular theme folder in the archive, but I can't remove it

    What is an IMAP account?
    If so try to connect via webmail to make the changes.
    In which case you will need to talk to your email provider.

  • How can I delete multiple emails at the same time?

    Is there a way to check and remove e-mails without opening them? I can just look at the e-mails and decide I want to remove open each and remove.

    There is no check box to select the messages as you can see in Thunderbird. Standard selection on the computer methods that existed for years of work.
    Here's how it works.

    https://www.Microsoft.com/resources/documentation/Windows/XP/all/proddocs/en-us/windows_fcab_select_files.mspx?mfr=true

  • How to delete several records by selecting the check box

    Hi I am a newbie in oracle forms Builder. I want to delete multiple records at the same time, when I click on the button. I have a 'emp_block' and 'control_block '.

    emp_block information: -.

    I have all the columns displayed in this block as empno, ename, sal, hiredate, deptno, comm.

    Other than that I add a new item of type "checkbox" and his name is "checkbox".

    control_block information: -.

    I have a "push button" in this control block.

    I added trigger "when-button-pressed" and write this line of code: -.

    EXECUTE_TRIGGER("ON-DELETE");

    COMMIT;

    "DELETE" is a trigger of form level. In this trigger, I wrote this code: -.

    BEGIN

    DELETE FROM EMP WHERE EMPNO =: EMP_BLOCK. CHECKBOX;

    END;

    Problem: -.

    Not one selected record is deleted when I click on the button Delete.

    I want to check little matter how much and when I press on delete button it has deleted all records whose box has been checked.

    Please help me...

    Welcome to the forum.

    In your WHEN-BUTTON-PRESS-trigger, just put your entire code and remove this EXECUTE_TRIGGER thing.

    To remove all verified records within a block, you must loop through the block and delete each record, something like

    BEGIN
      GO_BLOCK('YOUR_DATA_BLOCK');
      FIRST_RECORD;
      LOOP
        EXIT WHEN :SYSTEM.RECORD_STATUS='NEW';
        IF :YOUR_DATA_BLOCK.CHECKBOX='Y' THEN
          DELETE_RECORD;
        ELSE
          EXIT WHEN :SYSTEM.LAST_RECORD='TRUE';
          NEXT_RECORD;
        END IF;
      END LOOP;
    END;
    

    Make sure that you set the property "value when checked" section of box check "Y".

Maybe you are looking for

  • Need driver SATA XP for Satellite L300D - 11 M

    I am from Russia and use this model on Satellite L300D - 11 M PSLC8E-00J00URU.I have downloaded the drivers of this http://www.csd.toshiba.com/cgi-bin/tais/su/su_sc_dtlView.jsp?soid=1128070 or http://tinyurl.com/5c8d3finclude in Windows XP using nLit

  • DirectSound: program crashes on IDirectSoundCaptureBuffer_Release only on the USB audio devices

    Hi, this is a copy of https://Bugzilla.gnome.org/show_bug.cgi?id=763322 basically: sometimes windows IDirectSoundCaptureBuffer_Release method hangs forever or until I unplug all audio device that is used. Occurs only with devices usb and direct its a

  • Digital ID is missing in Windows Live Mail (7)

    on my Toshiba Satellite laptop, now whenever I try to send an email it tells me it will not be encrypted and I do not have a digital ID for me or for them. PS I am not very computer. At first my printer HP Photosmart C6380 all-in-one wireless wouldn'

  • Update of Windows 8 x 64 do not check updates

    HelloSince I installed Windows 8 x 64 yesterday on my laptop I am constantly looking for updates and it always freezes on the screen "check for updates... ». No pop out error etc. I used the Microsoft FixIt programs & automatic convenience stores sev

  • Lightroom4 to Lightroom CC

    Hello worldI have Lightroom4 and I'm looking to buy a CC. Is there something I need to do to save my catalogue of Lightroom4 and history, so that I can open it all back once again on LightroomCC without losing anything, I worked on (changes, user pre