Deleting Record from Database in PHP

I'm trying to figure out how to delete a record from my
database. I already have a recordset with my form selected. But
when I try to add "Delete Record," I can never seem to figure out
why it won't delete anything when I load the page in a browser, it
won't even go to the page I told it to go to after it deletes a
record. My guess is it's what I'm entering in the "Delete Record"
part of it, any help would be great. Also, my id is primary key if
that helps. Thanks ahead of time.

edwin@aw wrote:
> However, whenever I click on the hyperlink, the link
will becomes
>
http://www.domain.com/www.LinkFromDatabase.com.
Why it always append the web
> site's address?? Do I miss something?
This is happening because your link doesn't begin with
http://.
> echo "<a href='$link' target='_blank'> $link
</a>";
This should be echo "<a href='
http://$link' target='_blank'> $link
</a>";
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of
ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/

Similar Messages

  • Problem When deleting record from database

    Hi ,
    I have a question. Firstly I'm using VB
    I have a problem about deleting any record from access database , That's the code I'm use it for add new item and it's work but it's not work when I tried to edit any rows " it's not want to Save" but work for add new Item.
    Try
    Me.Validate()
    Me.CustomerBindingSource.EndEdit()
    Me.CustomerTableAdapter.Update(Me.KonoDataSet.Customer)
    MsgBox("Update Successful")
    Catch ex As Exception
    MsgBox("Update Failed")
    End Try
    And That's my code for Deleting any record from database But it's not work and that's a problem.
    CustomerBindingSource.RemoveCurrent()
    CustomerBindingSource.EndEdit()
    Me.CustomerTableAdapter.Update(Me.KonoDataSet.Customer)
    Can anybody help me about that issue ?

    Hi kono20006000,
    Your issue seems really strange. I would recommend you make a troubleshooting.
    1.Made sure your code works with the single copy of the database. You could check if it scans hard drive for the database file name and check if it modifies dates on found files. You could check if you operate with the same database.
    2. Use the application update the record at the form_load event to see if it would work correctly.
    3.Check the table in update statement and the table in add statement.
    Best Regards,
    Edward
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

  • Deleting records from database table

    Hi Experts,
    In this program i used Table Control.
    Here i want to delete the selected Rows. But Here if i say delete the selected row , it is deleting the last row. Why ?
    Please help me It's Urgent.
    Thanks,
    Basu
    MODULE USER_COMMAND_9000 INPUT.
      DATA: LV_FCODE LIKE SY-UCOMM.
      LV_FCODE = SY-UCOMM.
      CASE LV_FCODE.
        WHEN 'CHANGE'.
          FLG = 'Y'.
        WHEN 'DELETE'.
          FLG = 'Y'.
          LOOP AT I_MAKT.
            DATA NUM TYPE N.
            NUM = SY-TABIX.
            READ TABLE I_MAKT INDEX NUM INTO I_MAKT1-EMPID.
            MOVE I_MAKT1-EMPID TO I_MAKT2-EMPID.
          ENDLOOP.
          UPDATE ZEMPLOYE FROM TABLE I_MAKT.
          DELETE I_MAKT WHERE EMPID = I_MAKT2-EMPID.
          DELETE FROM ZEMPLOYE WHERE EMPID = I_MAKT2-EMPID.
          MESSAGE S001(YTC).
        WHEN 'INSERT'.
          MODIFY ZEMPLOYE FROM TABLE I_MAKT.
          MESSAGE S002(YTC).
        WHEN 'BACK'.
          SET SCREEN 0.
        WHEN 'EXIT' OR 'CANCEL'.
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_9000  INPUT

    Hi,
    See following link:
    http://www.sapmaterial.com/tablecontrol_sap.html
    Reward points if helpful.
    Regards.
    Srikanta Gope.

  • Delete record from the form and from the database

    hi,
    i want delete record from the form and the database ,but the record is only delete from the from !!!
    this is my code :
    if //condition then
    delete_record;
    commit;
    end if ;
    Any solutions ??
    thnx

    You have unique key field(s) on the table you are trying to insert which actually restricts you from inserting the same value again.
    When you are deleting the record and issue commit there is a record to be inserted in the table which is a duplicate that's why you are getting this unique error.
    As oracle is not able to insert your commit fails and stops your deletion of record from table

  • Delete records from multiple table

    Hi,
    I need to delete records from multiple tables using a single delete statement. Is it possible ? If so please let me know the procedure.
    Kindly Help.
    Thanks,
    Alexander.

    Hi Tim,
    Syntax of DELETE statement does not allow for multiple tables to be specified in this way. Infact, none of the DMLs allow you to specify table names like this.
    Technically, there are other ways of deleting from multiple tables with one statement.
    1. "Use a trigger":
    What was probably meant by this is that you have a driving-table on which you create a on-delete trigger. In this trigger, you write the logic for deleting from other tables that you want to delete from.
    This does mean a one-time effort of writing the trigger. But the actual DML operation of deleting from all the tables would be simply triggered by a delete on driving-table.
    2. Dynamic SQL:
    Write a PL/SQL code to open a cursor with table-names from which you want the data to be deleted from. In the cursor-for loop, write a dynamic SQL using the table-name to delete from that table.
    3. Using Foreign-Key constraint with Cascade-Delete:
    This I feel is a more 'cleaner' way of doing this.
    Having to delete data from multiple tables means that there is some kind of parent-child relationship between your tables. These relationships can be implemented in database using foreign-key constraints. While creating foreign-key constraint give the 'on delete cascade' clause to ensure that whenever data is deleted from parent-table, its dependent data is deleted from child-table.
    Using foreign-key constraint you can create a heirarchy of parent-child relationships and still your DELETE would be simple as you would only have to delete from parent-table.
    IMPORTANT: Implementing foreign-key constraints would also impact other DML operations that you should keep in mind.

  • How to handle the deleted records from R3

    Hello,
    We have created a generic data source on a database table in R3 side and now we have a case where there is a huge volume of data gets deleted and new records get updated every day.
    By doing a delta load we are able to load the New records and also the changed ones but we are unable to identify the deleted records from that table and move them to BI for deleteing those records in BI also.
    Can any one please suggest a solution for the handling the deleted records.
    Thanks,
    Ravindra.

    we had the same requirement some time ago and had two option:
    1. ask the R/3 development team add a deletion indicator in the table (and thus not actually deleting the record). this deletion indicator could then be used like for any other standard datasource
    this option was however refused, due to huge data volume after a while
    2. at the end of the load we copied the ZTABLE1 to ZTABLE2. then in the begin of the load (day after) we compare the data of table1 to table2. entries available in table2 but not in table1 are deleted, and we put a 'D'. in deletion indicator; as we only keep the deleted entries for one day, the volume of the new table is acceptable.
    M.

  • Deleting  records from datatable

    i am diplaying the records from database in the data table...how can i delete records in the data table .........if possible give me the code for that its urgent.....

    Use a command link (or button...whatever) to call your backing bean. The backing bean can then call the service layer which in turn calls the DOA...

  • Deleting records from table MVER

    We are experiencing performance issues when adding data to table MVER.  We have data on there that is over 5 years old which could be deleted.  As we have not been able to find any standard program or process that carries out housekeeping on MVER we are considering writing an ABAP program to delete the records.   Has anyone had any problems when deleting records from MVER or does anyone know of any reason why we should not delete these records in this way ?

    Well, I wouldn't delet data from a standard SAP table based on information from the internete. I'd look at other alternatives.
    Are you maintaining custom indexes on this table?
    Are your database statistics up to date?
    Consider a databse re-org.
    I don't think simple inserts should cause a problem.
    Rob

  • Delete records from tableA which are not in tableB

    Table A contains milions of records which is the best way to delete records from tableA which are not in tableB
    delete from tableA where empno not in (select empno from tableb)
    or
    delete from tableA where empno not exists (select empno from tableb
    where b.empno=a.empno)
    any help

    Hi
    If you can do this, do with this:
    create table tableC
    as select a.*
    from tableA a,
    (select empno from tableA
    minus
    select empno from tableB) b
    where a.empno = b.empno;
    drop table tableA;
    rename table tableC to tableA;
    Ott Karesz
    http://www.trendo-kft.hu

  • Delete recording from VSMS server

    In VSMS server, how can delete recording from storage? and can delete some of recording, like 1 hour from all recording or 1 day?

    Hello mshah,
    This is not recommended at all to delete recording files manually or for certain durations since every files has reference id created which are being associated to cameras.Deleting files in such can cause issue to the server.
    What is the reason behind deleting those files from server?
    Regards
    Nadeem Ahmed

  • Is there a way to delete records from MDM automatically?

    Is there a way to delete records from MDM automatically?
    I am able to import the data automatically through MDIS, but I have to delete the data first. Itu2019s possible to do it ?

    Hi Adam,
    Current scenario
    USER1: call ME to delete old catalog data
    ME: open the MDM & delete it manually
    USER1: Transaction to extract new data file
    MDIS: load the data to catalog
    As per your requirement, you should save map in following way which can solve your purpose. Create a XML file which should consist of new and existing records. So in import Manager, for newly added records you need to set Default Import Action as Create and for existing records you should use or set Default Import Action as Replace and then should save in map.
    So using this every-time if new record comes (not available in data manager), it will get created and for existing record (already available in Data Manager) it will replace (which means delete the existing record (old catalog data) and create a new record).
    Regards,
    Mandeep Saini

  • How to delete records from standard maintenance view

    Dear Sir/Madam,
            i want to delete records from standard view " v_mmim_rep_cust "
    This is a standard maintenance view , used in MBLB report.
    here i found the records with different report name but same fields as shown below...
    REPORT             TABLE NAME     FIELD NAME 
    RM07DOCS         MKPF                 BKTXT
    RM07DOCS         MKPF                 BLDAT
    RM07DOCS         MKPF                 BUDAT
    RM07DOCS         MSEG                 ANLN1
    RM07DOCS         MSEG                 ANLN2
    RM07DOCS         MSEG                 APLZL
    YRM07DOCS         MKPF                 BKTXT
    YRM07DOCS         MKPF                 BLDAT
    YRM07DOCS         MKPF                 BUDAT
    YRM07DOCS         MSEG                 ANLN1
    YRM07DOCS         MSEG                 ANLN2
    YRM07DOCS         MSEG                 APLZL
    I WANT TO DELETE THE RECORDS FROM THE VIEW WITH REPORT = YRM07DOCS.
    PLEASE HELP ME.
    Thanks in Advance,
    Dastagiri.

    Dear Sir,
          when i did so , it displays a message that  " entry mseg zeile  must not be deleted ".
    hense i went through writing a program to delete the records from table mmim_rep_cust
    but it says that record not found.
    program logic : 
    delete from mmim_rep_cust
        where report in report
          and TABNAME in TABNAME.
    if sy-subrc = 0.
    write ' RECORDS DELETED SUCCESSFULLY'.
    else.
    write ' RECORD NOT FOUND'.
    endif.
    please guide me to delete the records from the view.
    Thanks in advance,
    Dastagiri.

  • Delete records from internal table

    hi all,
    i want to delete records from intenal table which are starting with a particular starting number .
    eg internal table
    10000
    20000
    90000
    91000
    92000
    88880
    i want delete the records starting with 9 i.e. 90000 91000 92000.
    Thanks in Adv
            RAJ

    You can test this piece of code.
    DATA:
    i_tab TYPE STANDARD TABLE OF mara,
    wa_tab TYPE mara.
    wa_tab-matnr = '1000'.
    APPEND wa_tab TO i_tab.
    CLEAR wa_tab.
    wa_tab-matnr = '1001'.
    APPEND wa_tab TO i_tab.
    CLEAR wa_tab.
    wa_tab-matnr = '1002'.
    APPEND wa_tab TO i_tab.
    CLEAR wa_tab.
    wa_tab-matnr = '1003'.
    APPEND wa_tab TO i_tab.
    CLEAR wa_tab.
    wa_tab-matnr = '2001'.
    APPEND wa_tab TO i_tab.
    CLEAR wa_tab.
    wa_tab-matnr = '3001'.
    APPEND wa_tab TO i_tab.
    CLEAR wa_tab.
    wa_tab-matnr = '4010'.
    APPEND wa_tab TO i_tab.
    CLEAR wa_tab.
    <REMOVED BY MODERATOR>
    Edited by: Alvaro Tejada Galindo on Aug 8, 2008 4:49 PM

  • Any way to restore deleted record from VBAP table.

    Hi Guru,
    Is their any way to restore deleted record from vabp.
    Back is taken but , All quality server back is taken, any way to restore only
    deleted VBAP data from all Back.
    Regards
    Durgesh

    Hi Sahu ji,
    you will not be able to get those records.
    Check this : If this issue is in Development than no need to worry.
    If in quality and production , then usually a copy of the system is there , and this can help you.
    Also , check is there any report that exports this data in some other form for backup.
    Hope it help you.

  • Delete entries from Database table  t71inp1

    Hi,
    I want to Delete entries from Database table  t71inp1. Its a H R Table. I want to know the exact code.
    i saw the cide delete bkpf where usnam = p_name.
    Will it work the same here. Also.
    Please let me know.
    I hope to get reply from you soon.
    where should i write the code. i.e. Tcode SE38 and directly deeleting write the code.
    Please give me some inputs. I am new to H R ABAp
    Shivakumar K B
    919886920258

    hi
    You can write a program in se38.
    create a program.
    use delete from t71inp1 where<condition> command in it.

Maybe you are looking for

  • Creative zen 4gb won't turn on manually and acting stra

    My Creative zen 4gb can only be turned on when I connect it first to the computer, and after that, I can turn it on without the use of a computer. But if I don't use for a few hours, it won't turn on again, and I have to connect it to the computer ag

  • 5.1 Out

    I did some searches, and found the question asked before, but no answers. The posts are quite old though, so I thought I'd ask again and see if anyone has anything new. I've got an Audigy 2 with a digital output to the Creative DDTS-00 decoder, then

  • How can I return my iPhone4 to OS6 from OS7?

    How can I return my iPhone4 to OS6 from OS7?

  • Logging WLDF

    Hi all, This had probably been answered so apologies. Can't seem to find out how I can grab a simple log of JDBC Connection Pool info, Session info, and THread Usage while we are stressing our system our system, without having to look at the admin co

  • How to setup multi node installation

    Hi all, I have successfully installed Oracle E-Business Suite 11.5.10 in a single node. But, I would like to get some suggestions on How to perform the multinode installation in which all the application tier servers in independent nodes? If the node