Removal of MSQL 2 tables with a single button

As I was able to add data from two tables mysql with a single button, I guess I should be able to delete the two entries in a similar way, but I can't seem to get there. The code is written in large part by DW and I have only the level minimum idea of the meaning of the php, so please be patient in no explanation as to where I'm wrong!
At the present time, to the chk_sixmonth of the table entry is removed, but at table cel_contents incorrect records are deleted.
The corresponding code is, I think;
If ((isset($_POST['ck_pk'])) & & ($_POST ['ck_pk']! = "") & & (isset($_POST['gone']))) {}
$deleteSQL = sprintf ("DELETE FROM chk_sixmonth WHERE ck_pk is %s",
GetSQLValueString ($_POST ['ck_pk'], "int"));

@mysql_select_db ($database_tormented3, $tormented3);
$Result1 = mysql_query ($deleteSQL, $tormented3) or die (mysql_error ());

$deleteGoTo = "chk_insert.php";
If (isset {}
$deleteGoTo. = (strpos ($deleteGoTo, '?'))? « & » : « ? » ;
$deleteGoTo. = $_SERVER ['QUERY_STRING'];
}
header (sprintf ("location: %s", $deleteGoTo));
}

If ((isset($_POST['cel_pk'])) & & ($_POST ['cel_pk']! = "") & & (isset($_POST['gone']))) {}
$deleteSQL = sprintf ("DELETE FROM cel_contents WHERE cel_pk is %s",
GetSQLValueString ($_POST ['cel_pk'], "int"));

@mysql_select_db ($database_tormented3, $tormented3);
$Result1 = mysql_query ($deleteSQL, $tormented3) or die (mysql_error ());

$deleteGoTo = "chk_insert.php";
If (isset {}
$deleteGoTo. = (strpos ($deleteGoTo, '?'))? « & » : « ? » ;
$deleteGoTo. = $_SERVER ['QUERY_STRING'];
}
header (sprintf ("location: %s", $deleteGoTo));
}

$colname_rstSix = "1";
If (isset($_GET['scrap'])) {}
$colname_rstSix = (get_magic_quotes_gpc())? $_GET ["scrap"]: addslashes($_GET['scrap']);
}
@mysql_select_db ($database_tormented3, $tormented3);
$query_rstSix = sprintf ("SELECT * FROM chk_sixmonth WHERE ck_pk = %s", $colname_rstSix);
$rstSix = mysql_query ($query_rstSix, $tormented3) or die (mysql_error ());
$row_rstSix = mysql_fetch_assoc ($rstSix);
$totalRows_rstSix = mysql_num_rows ($rstSix);

$colname_rstCont = "1";
If (isset($_GET['scrap2'])) {}
$colname_rstCont = (get_magic_quotes_gpc())? $_GET ['scrap2']: addslashes($_GET['scrap2']);
}
@mysql_select_db ($database_tormented3, $tormented3);
$query_rstCont = sprintf ("SELECT * FROM cel_contents WHERE cel_pk = %s", $colname_rstCont);
$rstCont = mysql_query ($query_rstCont, $tormented3) or die (mysql_error ());
$row_rstCont = mysql_fetch_assoc ($rstCont);
$totalRows_rstCont = mysql_num_rows ($rstCont);
? >
<! DOCTYPE etc...

< form action = "" method = "post" name = "scrap" id = "scrap" > "
< input name = "gone" type = "checkbox" id = "gone" value = "gone" / >
< input type = "submit" name = "Submit" value = "Remove" / >

< input name = "ck_pk" type = "hidden" id = "ck_pk" value = "<?" PHP echo $row_rstSix ["ck_pk"];? ">" / >
< input name = "cel_pk" type = "hidden" id = "cel_pk" value = "<?" PHP echo $row_rstCont ["cel_pk"];? ">" / >
< / make >
Thanks for any help

Problem has now well sorted.

Tags: Dreamweaver

Similar Questions

  • How to select all text in a table with a single click cell?

    How to select all text in a table with a single click cell? I use TextField.selectAll () when you implement a table cell factory. But when I select a line with a single click, then a click on a table cell again: see the result image

    The text in the table cell is not all selected. What I simply selects all the text in a table cell when there is a click on it. How to realize that? Thank you

    Thanks for help ~.

  • We can create a view or table with a form button?

    We can create a view or table with a form button using forms 6i?
    If Yes, what will be the command?

    Gul says:
    We can create a view or table with a form button using forms 6i?
    If Yes, what will be the command?

    Yes. You can. Use the FORMS_DDL built-in. For example

    BEGIN
      Forms_DDL('create table temp(n NUMBER)');
      IF NOT FORM_SUCCESS THEN
        Message ('Table Creation Failed');
      ELSE
        Message ('Table Created');
      END IF;
    END; 
    

    Hope this helps

    Hamid

  • can perform us two actions with a single button in two clicks, one after the other?

    Mr President.

    can perform us two actions with a single button in two clicks, one after the other?

    I want that when I click on the button Add once it add data to the database and when I click again on this button it clears the form data to the empty fields.

    Concerning

    Tanvir

    In the code, it should be easy.

    The following code adds that a button called butman with text 'ADD '.
    It then registers a listener that will be called if the user clicks the button.

    This listener then calls the runAddData method if you clicked butman while it contained the text of "ADD" and it calls the runClearData method otherwise.
    That's why he will swap the functionality of the button between ADD and CLEAR on each click.

    final Button butman = new Button("ADD");
    butman.setOnAction(new EventHandler() {
              @Override
              public void handle(ActionEvent t) {
                        if (butman.getText().equals("ADD")) {
                                  butman.setText("CLEAR");
                                  runAddData();
                        } else {
                                  butman.setText("ADD");
                                  runClearData();
                        } // END IF-THEN
              }});
    

    I hope that's what you wanted.

    Further reflection.
    You might want to run the ADD and CLEAR methods in their own son so that it can run in the background without slowing down your user interface.

    I also reuse rather a single button for several features instead of to apply with hundreds of nodes used only rarely with masses of code to show and hide as needed.

  • Two actions with a single button Oracle adf

    Hello
    Dear all,
    I want two action with a single button. Before posting, I studied this thread, but it seems that it cannot solve my problem two actions with a single button?
    It's my button and its action http://4.bp.blogspot.com/-tpP5wIW8JLI/T66zhLZgG0I/AAAAAAAAAPY/F1A-Ka8KGPY/s1600/req1.JPG
    getReqID button is actually a call to a procedure that returns a value to his class of action. The cb1_action function is...
    public String cb1_action() {}
    BindingContainer links = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding("getReqID");
    Object result = operationBinding.execute ();
    int id = Integer.parseInt (result.toString ());
    System.out.println ("result =" + id);
    If (! operationBinding.getErrors () .isEmpty ()) {}
    Returns a null value.
    }
    Returns a null value.
    }
    It works very well. Don't know I want to, click this button, it also opens a page of .jsff. but I'm unable to open this page.
    Help, please
    Thank you
    Muhammad Nasir

    The first image you provided shows a small 'Attention' sign on the "request for quote-global-TF" which, I guess, gives you the sentence.
    This warning tells you that there is a problem with the task flow that you imported from the pot. Move the mouse over the warning sign a see what message you get from the frame on the error. If you don't get one, in 'source' view and look for red or orange squares in the gutter of the right hand. Scroll to the position of the red square and move the mouse over the underlined part red or orange of the code.

    Timo

  • Remove a line of table with a button in Livecycle Designer SS3

    I have a table in Livecycle which includes 16 static lines. Several lines can be added or removed dynamically at the end of the table.

    I want the user to be able to remove one of the static lines if they want to however I can't get the script to work.

    I have a button at the end of the line with the script:

    driverTable._Row2.removeInstance (true);

    I tried various forms of this script such as do not use the abbreviation for 'instanceManager', leaving 'real' outside, etc. Where it says 'Row2' I would like to use this script for the following lines, Row3, etc. Row4.

    I tried with the initial counter value of 1 and tried to zero. The table is in a fluid subform.

    Can anyone help?

    Hello

    A line cannot be set to 0 cases, if you want to remove a line, you need to hide by using its property of presence...

    But if you use 1 table for 16 different ranks, why don't you set the table with dynamic lines and have an initial 16 meter, then you can delete the lines you want with the removeInstance method

  • Insert two tables with a single query (same ID)

    Hello

    I want to insert two tables at the same time (with a single request) provided that both records get inserted with the same identifier. How can I do this?
    Table Movies
    id 
    name
    
    Table Category
    movie_id
    cat_type
    (a) insert in the first table, retrieve the id (can be using
    my_sequence.currval
    and then insert into another table.

    question: He brings three queries to the Database, I also suspect that when several people trying to insert there is a problem, I could be wrong.

    I have no other idea.

    Greatly appreciated!

    think you need to do as an anonymous pl/sql block.

    Dim cn As New OracleConnection("DataSource = xx'; user id = xx; password = xx;")
    
    Try
     'build the anonymous pl/sql
     Dim sb as New System.Text.StringBuilder
     sb.Append("declare")
     sb.Append(" l_N number;")
     sb.Append("begin")
     sb.Append("insert into movies (id,name) values (my_sequence.nextval, 'film1') returning id  into l_N;")
     sb.Append( "insert into category values (l_N, 'Category type');")
     sb.Append(" END;")
    
     'create commd object
    
     Dim cmd as New OracleCommand(sb.ToString,cn)
     cmd.Connection.Open()
     cmd.ExecuteNonQuerry()
     cmd.Connection.Close()
     cmd.dispose()
     Catch ex as Exception
    
      blah blah blah
    
    End try
    
      
    

    Published by: pollywog on May 28, 2010 10:48

    Published by: pollywog on May 28, 2010 10:49

  • Switch between two intelligent forms with a single button?

    Hello!  I work at 8 Captivate and try to use a single button to switch between two smartshapes.  I can't for the life of me figure out how to do it.  I know its possible to make it 'show' and 'hide', but is it possible to simply create a user click on a button and whenever we click on it, it comes and goes between two different smartshapes?

    Im trying to show the user the functionality on a piece of equipment when they press a button.  When they push the button, it comes and goes between two different read out on the screen.

    Thanks in advance!

    Have you looked at the blog post that I posted a link: I offer 4 scenarios.

    It can also easily be done, if you have a separate (shape) button to switch between two different objects:

    1. Create a user with a default value of 0 v_visib variable
    2. Create two objects and one of them is visible, the other invisible output ("eye" in the Properties Panel icon); I've tagged the ShapeOne and ShapeTwo, where ShapeOne is visible at the beginning
    3. Create this advanced conditional action (you can also turn it into a shared action):

    IF v_visib equals 0
    Hide ShapeOne
    See the ShapeTwo
    Toggle v_visib
    ON THE OTHER

    Hide ShapeTwo

    See the ShapeOne

    Toggle v_visib

    4 assign this action to the success of the button event

  • How to get out of edit mode tex with a single button?

    Hey,.

    Is there a way to escape from the editing of text with a single click or a button?

    Until now I always press CTRL + ENTER, then V and then I click outside the canvas so that the subsection is not highlighted. But it's a pain in the butt! Cant it be a single button for this?

    Thaks

    AO

    Something interesting, I just noticed: double click outside a text box can have different effects depending on the context.

    • With the selected pointer tool, double click on a text box allows you to edit the text. In this "quick editing" mode, double click outside the text box to go back to the pointer tool.
    • If the text tool has been manually selected, double click outside a text box will create a new text box.
  • Update the Table with the push button

    Hi I want to update my table using the push button that requires a transfer of account

    For example a single account transactions into 2nd account


    I used this query, but his does not work

    Update of cb
    Set cb_acc_id =: block3.acc_id_target
    where
    cb_acc_id =: block3.acc_id_source;



    Concerning

    Wasim Ismail

    You may forgot to validate your update...

    BTW:
    your form will not recognize, you start a transaction and make an update in the database.

  • Read multiple audio files with a single button - Playlist

    Hello

    im working on an interactive project that require the playlist function,

    The idea is to have a single button on a page that will play all the audio files on the page in the order they

    as you play a complete album in itunes or other players, when the first ending song the following begin to play and so on.

    Any ideas?

    Thank you

    Guy

    (1) put all the audio files in the Indesign document.

    (2) create a button,

    3) go to the Control Panel button and add multiple actions for 'Her', and for what actions define the audio file name

    Now go to the Panel of Timing and to organize the sequence of the audio file to read, just as the Panel layer, (drag / drop)

    Check the output.

  • How to merge data from the table with a single line

    Hello

    I have three tables subscription_type, the address and the person. Here are the details of the table

    Person Subscription_type Address                                           

    Person_Id AdressType_id Address_id

    Person_name Description Address_type_id

    Person_id

    Address details


    There are three types of different address - home, postal and previous.

    Each person can have these three different addresses.

    I want to create a view that displays all addresses of three of each person in the table of the person in a single line.

    Any help please

    In your example, there are 2 rows of columns street1, TOWN, SUBURB etc for a single person. To convert this into a single line, with the new columns we could simply use CASES or DECODE in the select as the SQL below. To understand why consolidation function THAT MAX is used - remove the MAX and GROUP BY in SQL keyword and try.

    Select full_name

    , max (case when description = "Home" then end street1) Home_Street

    , max (case when description = "Home" then end suburb) home_suburb

    , max (case when description = end of the "Home" then City) home_city

    , max (case when description = "Home" then postal code end) home_postcode

    , max (case when description = "Home" then end state_name) home_state

    , max (case when description = 'Postal' then end street1) Postal_Street

    , max (case when description = 'Postal' and then end of suburb) Postal_suburb

    , max (case when description = 'Postal' then the city) Postal_city

    , max (case when description = 'Postal' and then end of CP) Postal_postcode

    , max (case when description = 'Postal' then state_name end) Postal_state

    , max (case when description = "Back" then end street1) Prev_Street

    , max (case when description = "Back" then end suburb) Prev_suburb

    , max (case when description = "Back" then city end) Prev_city

    , max (case when description = "Back" then postal code end) Prev_postcode

    address a

    S State

    No p

    Subscription_type att

    where a.person_id = p.person_id

    and a.state_id = s.state_id

    and a.address_type_id = att.address_type_id

    Full_name group

  • Stored procedure to remove a number of tables with a common name attribute

    Hi all

    This is my first post so I hope I posted level with enough information. This is my first stored procedure (SP) and Oracle 10.

    I'm trying to write a script to remove 11 paintings and some lines of another 3 tables, which are named with a number I want to enter at the time of the creation of MS below is the script that I wrote and edited. My original was lost by crashing the servers!

    When I run the script, it gives me the following output:

    "WARNING: execution completed with warning.
    procedure ScenarioDelete update"

    MS has not deleted one of these tables and I don't know if it's because my script is poor or because of something else. Any help is greatly appreciated!

    -table remove SP
    --
    -Race start ScenarioDelete ('x'); with the idscenario x

    create or replace procedure ScenarioDelete (ScenarioNo IN varchar2);
    countstable: = "C_". ScenarioNo;
    CHANGETABLE: = "CG_" | ScenarioNo;
    countsinfotable: = 'CI_ ' | ScenarioNo;
    DataTable1: = "D_0_" | ScenarioNo;
    datatable2: = "D_1_" | ScenarioNo;
    datatable3: = 'D_2_ ' | ScenarioNo;
    hietable1: = 'HI_0_ ' | ScenarioNo;
    hietable2: = 'HI_1_ ' | ScenarioNo;
    hietable3: = 'HI_2_ ' | ScenarioNo;
    hielinktable1: = 'HL_1_ ' | ScenarioNo;
    hielinktable2: = 'HL_2_ ' | ScenarioNo;

    AS

    run immediately 'drop table ' | countstable;
    run immediately 'drop table ' | CHANGETABLE;
    run immediately 'drop table ' | countsinfotable;
    run immediately 'drop table ' | DataTable1;
    run immediately 'drop table ' | datatable2;
    run immediately 'drop table ' | datatable3;
    run immediately 'drop table ' | hietable1;
    run immediately 'drop table ' | hietable2;
    run immediately 'drop table ' | hietable3;
    run immediately 'drop table ' | hielinktable1;
    run immediately 'drop table ' | hielinktable2;

    immediately execute "delete from USERACESS where IDSCENARIO = ' |" ScenarioNo;
    run immediately "remove scenario where IDSCENARIO = ' |" ScenarioNo;
    immediately execute "delete from SCENARIOINFO where IDSCENARIO = ' |" ScenarioNo;

    -or-

    run immediately "delete from USERACESS where IDSCENARIO =" | " ScenarioNo | ''';
    run immediately "remove scenario where IDSCENARIO =" | " ScenarioNo | ''';
    run immediately "delete from SCENARIOINFO where IDSCENARIO =" | " ScenarioNo | ''';

    END;

    Hello

    Welcome to the RTO

    If you allow me, I would like to make a suggestion to simplify your code

    Create OR Replace Procedure ScenarioDelete(ScenarioNo IN Varchar2)
    As
       Type t_DropTable Is Table Of Varchar2(30);
       v_DropTable t_DropTable := t_DropTable( 'C_', 'CG_', 'CI_', 'D_0_', 'D_1_', 'D_2_', 'HI_0_', 'HI_1_', 'HI_2_', 'HL_1_', 'HL_2_' );
    
       Type t_DeleteTable Is Table Of Varchar2(30);
       v_DeleteTable t_DeleteTable := t_DeleteTable( 'USERACESS', 'SCENARIO', 'SCENARIOINFO' );
    Begin
       -- Drop tables
       For i IN v_DropTable.First .. v_DropTable.Last Loop
          Execute Immediate 'DROP TABLE ' || v_DropTable(i) || ScenarioNo;
       End Loop;
    
       -- Delete tables
       For i IN v_DeleteTable.First .. v_DeleteTable.Last Loop
          Execute Immediate 'DELETE FROM ' || v_DeleteTable(i) || ' WHERE SCENARIOID = ' || ScenarioNo;
       End Loop;
    End;
    

    Kind regards

    Christian Balz

  • How to remove line before Panel table with databases?

    Hi friends,

    I created the table creation of database for the list of users. Which works very well. And I also recover data that is I've stored previously and I have displayed in table format on the front. Now, I want to delete a whole line, is not a wise order, for example, now, I have a table, there total 7 rows and 5 columns. Now, I want to delete the 3 rows using by selecting the line (i.e., click anywhere in this line and press the button) that day that the rank will be remove from the database. Then remaining will again store in the database.

    I want this way is it possible or not?

    Thanks

    Concerning

    Joel M

    India

    Note: I use the LabVIEW database connectivity toolkit

    Database: Ms access

    Sorry for my grammatical error

    arun575 wrote:

    Hi friends,

    [...] Now, I want to delete the 3 rows using by selecting the line (i.e., click anywhere in this line and press the button) that day that the rank will be remove from the database. Then remaining will again store in the database.

    Instead of storing data in the database, simply remove the record that you have removed from your FP indicator and recharge the light on the database.  (The first column in my database is named ID - autoindexed, the primary key)

    EDIT - only sub blue-vi is https://lavag.org/files/file/60-array-point-to-rowcol/

  • How to check the account of a column value is less than the other value of column in a table with a single column

    Hello

    Please let me know how to query the table and get the records that are less than the other column.

    ID item_id item_type

    3     1           r1

    2 4 r2

    1 5 r3

    6 5 r4

    I need to get all the lines in which item_id < id

    o/p

    ID item_id item_type

    3     1           r1

    6 5 r4

    SELECT ID, ITEM_ID, ITEM_TYPE

    Of

    WHERE ITEM_ID<>

Maybe you are looking for