Update the value of the column based on another value of the column to another table

Hi all

I have something very confused me and need your help.

Having two tables A and B.

Table A have 2 column (+ id + and desc1)

Table B have column 2 also (+ transnum + and desc2)

Now, I want to update the column desc2 of table B identical desc1 of table was where transnum of Table B same as the id of the table has.

I use this SQL

update of a2 set a2.desc2 = a1.desc1 of a2 on a2.transnum = a1.id inner join a1

but this error occurs

Error from line 5 in order:
update of a2 set a2.desc2 = a1.desc1 of a2 on a2.transnum = a1.id inner join a1
Error in the command line: 5 column: 35
Error report:
SQL error: ORA-00933: SQL not correctly completed command
* 00933. 00000 - "command not properly ended SQL."
* Question: *.

* Action. *

Hope someone can help me. TQ for help...
SQL> create table a1 (id number(2),des varchar2(10));

Table created.

SQL> create table b1 (transnum number(2),des varchar2(10));

Table created.

SQL> insert into a1 values (1,'maran');

1 row created.

SQL> insert into b1 values (1,'ram');

1 row created.

SQL> commit;

Commit complete.

SQL> update b1 set des=(select des from a1 where b1.transnum=a1.id);

1 row updated.

SQL> select * from b1;

  TRANSNUM DES
---------- ----------
         1 maran

Tags: Database

Similar Questions

  • best way to create a table based on another table

    Hello
    I am trying to create a table based on another table with all the data in it. It contains important data.

    create table < tablename > select * from table1.

    Is the best way to do it, or is there another way. Please advice.

    Thank you

    Insert / * + append * / in as select * from ;

    It should be->

    insert /*+ append */ into 
    select * from ;
    

    Kind regards.

    LOULOU.

  • How to monitor the update the user trigger sql table column

    Hello

    My database in the face of a problem that someone (or some jobs) always update the decimal points in a column. I want to trace who (what) update of the column, but the database do not have verification of activation.

    can anyone help. provide a trigger script to monitor the table if the column has been updated by commas, which returns records in a table.

    Thank you very much.

    Concerning

    Sean

    Why not, it's also so easy...! ! !

    SQL> CREATE TABLE audit_log (
      2  old_id VARCHAR2(15),
      3  new_id VARCHAR2(15),
      4  chng_by VARCHAR2(10),
      5  chng_when DATE,
      6  machine VARCHAR2(20),
      7  osuser VARCHAR2(20));
    
    Table created.
    
    SQL> CREATE OR REPLACE TRIGGER referencing_clause
      2  AFTER UPDATE
      3  ON report_heading
      4  REFERENCING NEW AS NEW OLD AS OLD
      5  FOR EACH ROW
      6  BEGIN
      7  IF INSTR(:NEW.ID,',') > 0
      8  THEN
      9  INSERT INTO audit_log
     10  (old_id, new_id, chng_by, chng_when, machine, osuser, ipadd)
     11  VALUES
     12  (:OLD.ID, :NEW.ID, USER, SYSDATE, SYS_CONTEXT('USERENV','HOST'), SYS_CONTEXT('USERENV','OS_USER'));
     13  END IF;
     14  END referencing_clause;
     15  /
    
    Trigger created.
    
    SQL> ALTER TABLE REPORT_HEADING ENABLE ALL TRIGGERS;
    
    Table altered.
    
    SQL> SELECT * FROM REPORT_HEADING;
    
    ID
    --------------------
    104001.1
    104002.1
    104002.1
    99.00
    246004.1
    88.00,
    
    6 rows selected.
    
    SQL> UPDATE REPORT_HEADING SET ID='99.11,' WHERE ID='99.00';
    
    1 row updated.
    
    SQL> SET LINE 200;
    SQL> select * from audit_log;
    
    OLD_ID          NEW_ID          CHNG_BY    CHNG_WHEN MACHINE              OSUSER
    --------------- --------------- ---------- --------- -------------------- -------------------- ---------------
    99.00           99.11,          SCOTT      05-MAR-10 BOSER\GIRISH         GIRISH\Girish Sharma
    

    BOSER here is my workgroup name and GIRISH is my machine name.

    HTH
    Girish Sharma

  • help on the use of dynamic action to update the items in a table (more precisely, the radio button) based on the collection

    Hi everyone, I posted this question in the past and made huge strides with the help of Denes Kubicek: https://apex.oracle.com/pls/apex/f?p=31517:294:115851992029365: based on my previous question posted: https://forums.oracle.com/forums/thread.jspa?threadID=2537494

    I'm fighting with a single element in my tabular presentation.  There is a radio button.  The choices all seem correctly, but the value is not saved in the collection (and therefore not recorded in the table).  All the other elements in the form of tables to record properly.

    Here's what I have for the query.   This is element c024 (which maps to;) ("F03'), which is defined as a radio based on an existing LOV LOV.

    Currently I have:

    2 items on the page:

    P110_ID

    P110_VALUE

    Dynamic action called COLUMN of CHANGE:

    event: CHANGE

    selection type: jQUERY Selector

    jQuery:

    Select jQuery = input [name = "f03"], select [name "f08"], select [name = "f09"], input [name = 'f10'], input [name = 'f11'], input [name = 'f12'], select [name = "f40"], input [name = "f21"], input [name = 'f22'], input [name = "f23"], input [name = 'f50']

    scope of the event: Dynamics

    real action #1: set the P110_ID javascript expression this.triggeringElement.id

    real action #2: set the P110_VALUE javascript expression this.triggeringElement.value

    action 3: run pl/sql code

    declare
      v_member number;
      v_seq number;
    begin 
      v_member := TO_NUMBER (SUBSTR (:p110_id, 2, 2));
      select ltrim(substr(:p110_ID,5,4),'0') into v_seq from dual;
      safis_collections.update_column(v_seq,
                                    v_member,
                                    :p110_value);
    
    
    

    refreshment area true creation #4: LANDINGS_COLLECTION

    the tabular presentation is based on the query:

    SELECT
    apex_item.text(1,seq_id,'','','id="f01_'||seq_id,'','') "DeleteRow",
    seq_id,
    seq_id display_seq_id,
    apex_item.text_from_LOV(c004,'SPECIES')||'-'||apex_item.text_from_LOV(c005,'GRADE')||'-'||apex_item.text_from_LOV(c006,'MARKETCODE')||'-'||apex_item.text_from_LOV_query(c007,'select unit_of_measure d, unit_of_measure r from species_qc') unit,
    apex_item.select_list_from_LOV(8,c008,'DISPOSITIONS','onchange="getAllDisposition('||seq_id||')"','YES','0','  -- Select Favorite --  ','f08_'||seq_id,'') Disposition,
    apex_item.select_list_from_LOV(9,c009,'GEARS','style="background-color:#FBEC5D; "onFocus="checkGearPreviousFocus('||seq_id||');"onchange="getAllGears('||seq_id||')"','YES','3333','-- Select Favorite --','f09_'||seq_id,'') Gear,
    apex_item.text(10,TO_NUMBER(c010),5,null, 'onchange="setTotal('||seq_id||')"','f10_'||seq_id,'') Quantity,
    apex_item.text(11,TO_NUMBER(c011),5,null,'onchange="getPriceBoundaries('||seq_id||')"','f11_'||seq_id,'') Price,
    
    apex_item.text(12, TO_NUMBER(c012),5,null, 'onchange="changePrice
    ('||seq_id||')" onKeyDown="selectDollarsFocus('||seq_id||',event);"','f12_'||seq_id,'') Dollars,
    decode(c013,'Y',apex_item.text(14, c014,30,null,'style="background-color:#FBEC5D;" onClick="onFocusAreaFished('||seq_id||');"','f14_'||seq_id,''),'N','N/A') Area_Fished,
    decode(c017,'Y',apex_item.text(18, c018,4,null,'style="background-color:#FBEC5D; "onBlur="setUnitQuantity('||seq_id||')"','f18_'||seq_id,''),'N','N/A') UNIT_QUANTITY,
    decode(c017,'Y',apex_item.text(19,'CN',3,null,'readOnly=readOnly;','f19_'||seq_id,''),'N','N/A') UNIT_COUNT,
    c024 hms_flag,
    decode(c050,'Y',apex_item.checkbox(21,'Y','id="f21_'||seq_id||'" style="background-color:#FBEC5D; " onClick="alterYes('||seq_id||');" onKeyPress="alterYes('||seq_id||');"',c021),'N','N/A') FinsAttached,
    decode(c050,'Y',apex_item.checkbox(22,'N','id="f22_'||seq_id||'" style="background-color:#FBEC5D;" onClick="alterNo('||seq_id||');" onKeyPress="alterNo('||seq_id||');"',c022),'N','N/A') FinsNotAttached,
    decode(c050,'Y',apex_item.checkbox(23,'U','id="f23_'||seq_id||'" style="background-color:#FBEC5D;" onClick="alterUnk('||seq_id||');" onKeyPress="alterUnk('||seq_id||');"',c023),'N','N/A') FinsUnknown,
    decode(c050,'Y',apex_item.textarea(28,c028,3,null,null,'f28_'||seq_id,''),'N','N/A') Explanation,
    decode(c024,'N',apex_item.select_list_from_LOV(29,c029,'HMSNATURE','onchange="saveNature('||seq_id||')"','YES','A','-- Select Nature of Sale --','f29_'||seq_id,''),'U',apex_item.select_list_from_LOV(29,c029,'HMSNATURE','onchange="saveNature('||seq_id||')"','YES','A','-- Select Nature of Sale --','f29_'||seq_id,''),'Y','N/A') Nature_Of_Sale,
    decode(c020,'Y',
    apex_item.select_list_from_LOV(40,c040,'HMS_AREA_CODE','style="background-color:#FBEC5D;"',null,null,null,'f40_'||seq_id,''),
    'N','N/A') HMS_AREA_CODE,
    c020,c050,
    decode(c020,'Y',
    apex_item.text(41,TO_NUMBER(c041),5,null,null,'f41_'||seq_id,''),
    'N','N/A') Sale_Price
    from apex_collections
     where collection_name = 'SPECIES_COLLECTION' order by seq_id
    
    
    
    
    
    

    I noticed the following:

    When I change the column C011 (price) the following values are defined in dynamic action:

    P110_ID = f11_1

    P110_VALUE is everything that I change the price.

    When I change the column C024 (hms_flag), the following values are defined:

    P110_ID = f03_0001

    P110_VALUE = change everything what I hms_flag to.

    the region is updated in my dynamic action, and change of hms_flag does not take.  I tested the SQL query that generates the value of v_SEQ in the dynamic action.   Both a change of price and HMS_FLAG, it seems valid

    Select ltrim (substr(:p110_ID,5,4),'0 ') in the double v_seq;

    If f11_1, v_seq: = 1

    If f03_0001, v_seq: = 1

    Thank you!

    solved.  sort of.

    domain c024 references f03.

    dynamic ACtion, step 4 calculated v_member as a substring of P110_ID... and in all other areas, the column and the field (fxx) displayed the same value... otherwise c024.

    I'm not exactly sure how solve it, but see the problem.

  • Download massive updated the planned orders in table msc_supplies

    Hi all

    I need your suggestion below requirement:

    For item RM, we planned order suggested that the CPHA; before releasing it, we want to change Date of implementation and the amount of order, then output the last modified scheduled released automatically to create the PR in purchases & Payables.

    In order to change the planned orders of RM, we export order planned the Workbench of the CPSA in the worksheet and then change dates, quantity, etc. in the worksheet. We want this change data to insert in the table msc_supplies automatically with manually intervene them and followed by releasing these planned automatically orders to create a PR

    We want to know how to achieve this requirement. We want to know the available custom hook and script to insert record in to msc_supplies.

    Have a great day.

    Thank you

    Sanngo

    Hello

    We expect steps below:

    (1) export the planned RM command suggested by the CPSA to the spreadsheet or report.

    (2) prepare the csv file with mandorty field as shown below in the table, i.e. date, quantity, etc. and format the data according to the custom intermediate table created.

    (3) custom concurrent requests created, which is used to locate the data file and upload the data to a custom intermediate table.

    (4) of the intermediate table that we are download the same data in the database MSC_SUPPLIES table (make a validation here check) in the same program. After that a manually scheduled commands added to the table of MSC_Supplies and can be found in the CPSA workbench.

    (4) in the same concurrent application of custom, call "automatic rejection" to release these records of the base table of msc_supplies, where release_flag a value of 1.

    We want to know the required fields need to be updated in the staging table custom and the base table:

    ORGANIZATION_CODE

    ORGANIZATION_ID

    ITEM_SEGMENTS

    INVENTORY_ITEM_ID

    ORDER_TYPE_TEXT

    ORDER_TYPE (5)

    New Date

    FIRM_DATE

    New quantity

    FIRM_QUANTITY

    Argument Plan_ID

    Transaction_id

    RELEASE_STATUS (1)

    SR_INSTANCE_ID

    You can test adding the manually planned adhoc decrees on Workbench CAWC namely, which are updating fields in the MSC_SUPPLIES table.

    Have a great day.

    Thank you

    Sannago

  • SQL update the context field to table oe_order_lines_all

    Hello

    Can update us the context field on the order line table using sql update. Can someone please let me know, what would this cause.

    I use the same context values that are defined in the form of DFF, but one of the value is missing from the FDF form. What is the next step?

    Example:

    Update oe_order_lines_all
    Set frame = (select...), attribut1 = 'test '.
    where header_id = 1101

    Hello

    Consult the following document and see if it helps.

    Note: 746787.1 - process of PLC control in the management of order- UPDATE operation
    https://metalink2.Oracle.com/MetaLink/PLSQL/ml2_documents.showDocument?p_database_id=not&P_ID=746787.1

    Kind regards
    Hussein

  • How do I know which updated the field in a table

    Hi all

    There is a table that stores the information of bank account that has been updated from last month. Anyway is to know which user, what iP or any other detail that has updated.

    Auditing is enabled.

    Thanks in advance.

    Kind regards


    Hi John,.

    The audit is at the database level. sys. AUD$ table. I m new with the part of the audit. With this we can retrieve information about who has updated.

    Thanks in advance

    Kind regards

  • When the need to update the statistics for a table

    In Sybase, we use "delete the statistics', 'update all statistics" and 'sp_recompile', fact Oracle need to do such things anyway? Thank you!

    Given that the V10 by default Oracle collects "necessary" statistics (new) once every 24 hours.

    If you determine that your situation requires a different treatment, so you must do manually what you feel is appropriate.

  • Update a field in a sequence based on another field

    Hi all

    Small problem: -.

    CREATE THE TABLE:
     CREATE TABLE SEQTABLE 
    ("GRP_NUM" VARCHAR2(20), 
    "ORDER" NUMBER(5), 
    "NEW_GROP" VARCHAR2(20) ) ;
    DATA: -.
     
    INSERT INTO SEQTABLE ("GRP_NUM" ,"ORDER" ,"NEW_GROP"     )     VALUES ('POIP1234567891234567' ,1 ,''  )
    INSERT INTO SEQTABLE ("GRP_NUM" ,"ORDER" ,"NEW_GROP" ) VALUES ('POIP1234567891234567' ,2 ,''  )
    INSERT INTO SEQTABLE ("GRP_NUM" ,"ORDER" ,"NEW_GROP" ) VALUES ('POIP1234567891234567' ,3 ,''  )
    INSERT INTO SEQTABLE ("GRP_NUM" ,"ORDER" ,"NEW_GROP" ) VALUES ('LKJG1234567897412589' ,1 ,''  )
    INSERT INTO SEQTABLE ("GRP_NUM" ,"ORDER" ,"NEW_GROP" ) VALUES ('JHGF1234567891234567' ,1 ,''  )
    INSERT INTO SEQTABLE ("GRP_NUM" ,"ORDER" ,"NEW_GROP" ) VALUES ('JHGF1234567891234567' ,2 ,''  )
    SELECT *.
     
    SQL> SELECT * FROM SEQTABLE;
    
    GRP_NUM                ORDER        NEW_GROP
    --------------------       ----------       -------------
    POIP1234567891234567          1
    POIP1234567891234567          2
    POIP1234567891234567          3
    LKJG1234567897412589          1
    JHGF1234567891234567          1
    JHGF1234567891234567          2
    Here my problem, I need to generate a smaller GRP_NUM in the field of the NEW_GROP. But can't just Substr field of origin. This field must be uniquie to the group.

    Desired results: -.
     
    GRP_NUM                  ORDER        NEW_GROP
    --------------------        ----------       -------------
    POIP1234567891234567          1             10001
    POIP1234567891234567          2             10001
    POIP1234567891234567          3             10001
    LKJG1234567897412589          1             10002
    JHGF1234567891234567          1             10003
    JHGF1234567891234567          2             10003
    Any ideas guys
    me@MYDB> create table newgroup (id number,grp_num VARCHAR2(20));
    
    Table created.
    
    me@MYDB> create sequence seq_newgrp_id start with 1000 increment by 1;
    
    Sequence created.
    
    me@MYDB> insert into newgroup select seq_newgrp_id.nextval,grp_num from (select distinct GRP_NUM  from SEQTABLE);
    
    3 rows created.
    
    me@MYDB> commit;
    
    Commit complete.
    
    me@DBADB> select * from newgroup;
    
            ID GRP_NUM
    ---------- ------------------------------------------------------------
          1001 JHGF1234567891234567
          1002 LKJG1234567897412589
          1003 POIP1234567891234567
    
    me@DBADB> UPDATE seqtable s
       SET s.new_grop =
           (SELECT n.id FROM newgroup n WHERE s.grp_num = n.grp_num)
    
    me@MYDB> commit;
    
    Commit complete.
    

    Edited by: Kecskemethy November 18, 2010 01:55
    Update added at the end

  • How one table based on another table on average?

    Example:

    I have the ARRAY1 array with the following:

    1

    1

    1

    2

    2

    3

    Array2 contains:

    1

    2

    3

    4

    5

    6

    In the end, ARRAY3 would contain:

    2                  (1+2+3)/3

    4.5               (4+5)/2

    6                  (6)/1

    This is my first go at it.  There are a lot of improvements that can be made (conditional index is one) but it seems to do what you want.  Table 1 and 2 must be the same size to make it work.

  • Delete records based on another table

    Hi all
    I have two tables called table1 and table2. The two tables are joined with fk. tab2_id I need now to remove all records of two table where lic_no is null in table2.

    Table structure:
    Table1:
    tab1_Id
    tab2_id
    CNAME
    address
    contact

    Table2
    tab2_id
    lic_no
    issue_date
    fees
    Comments



    I'm trying like this -
    delete from table1 as some tab2_id of t table2 where tab2_id! = t.tab2_id
    but I get the error message.

    I also tried to delete table2 first records and then delete an array like this -
    delete from table1 where tab2_id! = (select tab2_id from table2)
    get the error "subquery returns multiple rows.

    Hope in this sense.

    I don't know what I'm doing wrong. Please suggest.

    Thanks in advance.

    Kind regards

    Pascal M

    It will work

    DELETE from  table1
    WHERE  tab2_id in ( select tab2_id
                        from table2
                        where lic_no is null ) ; 
    
    DELETE from table2 where lic_no is null ;
    

    Note: Disable constraints between the tables if you have a

    I think this is what your need.

    SS

  • Update of the table based on another

    Hello

    I'm trying to update a date column in a table based on another table. There is a unique ID in each table that identifies and connects each person:
    update patient_bu a set a.entry_date = (select b.entry_date from CLIENT_MED_DT b where a.id = b.id)
    This is the error:

    ORA-01427: einreihig subquery returns multiple rows


    The problem (I think) is that the select statement back several dates for records people. There are some people / records that have multiple entry dates, but I'm only interested in the most recent date.

    How can I update this table with only the most recent date?

    Thanks for any help,
    Matt

    Oh well, I forgot the UPDATE clause:

    SQL> create table patient_bu
      2  (id number
      3  ,entry_date date);
    
    Table created.
    
    SQL> create table client_met_dt
      2  (id number
      3  ,entry_date date);
    
    Table created.
    
    SQL> merge into patient_bu a
      2  using (select id
      3               ,max(entry_date) max_date
      4         from   client_met_dt
      5         group  by id
      6        ) b
      7  on    (a.id = b.id)
      8  when  matched then update
      9        set a.entry_date = b.max_date;
    
    0 rows merged.
    
  • How to update the password on the other table based on the mod

    Hello

    I need to update the password for the other table based on the mod.

    I have two table 'user' and 'reset '.


    User:

    Username username password date_exp

    s232322 Bobby John sdds4545df4r 10/12/2010
    s454566 George Bill f444556gh76 07/14/2010
    s343466 Bill Clinton fgf54tyujkkkhj 06/12/2011
    .
    .
    .


    Reset:

    Series encrypt decrypt

    fgf5656fg 0 Watellemon
    1 dfggf5665 lime juice
    dfdffd545 2 applesalad
    3 54r4gggt airlines
    construction of 4 hg44hh63
    5 fgf4343yh security
    .
    .
    .

    How can I update the password of a table to another table "reset"?

    Ex: query

    Update user set password = (select Encrypt reset where mod (length (username), 10))


    If mod (length (username), 10) is 0, it should take series "0" encrypt the password and update the password in the table "user".
    If mod (length (username), 10) is 1, it should take serial '1' encrypt the password and update the password in the table "user".
    If mod (length (username), 10) is 2, it should take series '2' encrypt the password and update the password in the table "user".
    If mod (length (username), 10) is 3, it should take series '3' encrypt the password and update the password in the table "user".
    If mod (length (username), 10) is 4, it should take series '4' encrypt the password and update the password in the table "user".
    ....


    Please help me write an update query.




    Thank you
    Nihar

    Hi, Nihar,

    You almost had it! You just need to correlate the subquery for the main UPDATE statement, like this:

    UPDATE     user_table     u     -- USER is a built-in function; it's not a good table name
    SET     password = ( SELECT  encrypt
                   FROM    reset     -- RESET isn't a very good table name, either
                   WHERE   serial     = MOD ( LENGTH (u.username)
                                             , 10
                                   )
                 );
    
  • The use of FORMS_DDL to upadate another table

    Hi all

    I want to update a record in a table by using the statement of forms_ddl against a button to a form that is based on another table. I used the following to do this but no updates or error free code
    occered-

    COMMIT_FORM;
    IF: CASE_STATUS. WRIT_OFF = 1 THEN
    FORMS_DDL ('UPDATE CASE_INFO SET WRIT_OFF = 1 WHERE CASE_NO =' |: CASE_STATUS.) CASE_NO);
    ON THE OTHER
    FORMS_DDL ('UPDATE CASE_INFO SET WRIT_OFF = 0 WHEN CASE_NO =' |: CASE_STATUS.) CASE_NO);
    END IF;
    COMMIT_FORM;


    What is wrong with my code. Please help me find the problem. I use form 10g.

    Arif
    COMMIT_FORM;
    IF :CASE_STATUS.WRIT_OFF=1 THEN
    UPDATE CASE_INFO SET WRIT_OFF=1 where CASE_NO= :CASE_STATUS.CASE_NO;
    ELSE
    UPDATE CASE_INFO SET WRIT_OFF=0 where CASE_NO=:CASE_STATUS.CASE_NO;
    END IF;
    COMMIT;
    

    Forms_ddl builtin is used to launch the ddl through forms. No need to use it for dml.

  • PHP convert the variable date of table format

    I can not explain this without showing all the code...

    I have a script which basically scrape information off the myspace site and updates the information in a table.  I then had the script put this in tabular form.  The problem that I'm hoping to get help, I would like to change the date format, and I don't know how I can do this since it is Setup how to loop through the table.  If anyone can show me a better way to do it without a loop or a way to convert the date, I'd be very happy.

    18/06/2009 22:00-Thursday, June 18, 2009 22:00

    <? PHP

    include('simplehtmldom/simple_html_dom.php');

    $myspace_url = "url I'm scraping."

    ini_set ('user_agent', ' scratch/2.5');

    $html = file_get_html ($myspace_url);

    $i = 0;

    foreach ($html-> find ('input [type = "hidden"]') as $k = > $v) {}

    If ($v-> name == "calEvtLocation") {}

    $shows [$i] ['location'] is $v-> value;.

    }

    If ($v-> name == "calEvtCity") {}

    $shows [$i] ['city'] is $v-> value;.

    }

    If ($v-> name == "calEvtState") {}

    $shows [$i] ['State'] is $v-> value;.

    }

    If ($v-> name == "calEvtDateTime") {}

    $shows [$i] ['date'] is $v-> value;.

    $i++;

    }

    }

    ? >

    < table border = "0" align = "center" cellpadding = "8" cellspacing = "0" >

    < b >

    < e style = "text-align: left;" do-size: 12px; "> < /th > venue

    < e style = "text-align: left;" do-size: 12px; ' > city < /th >

    < e style = "text-align: left;" do-size: 12px; "> Status < /th >

    < e style = "text-align: left;" do-size: 12px; "> date/time < /th >

    < /tr >

    <? PHP

    foreach ($shows as $show)

    {

    echo "< tr >";

    foreach ($show as $item)

    {

    echo "< td > < table > $item";

    }

    echo "< /tr >";

    }

    ? >

    < /table >

    Move the $i ++ should not have any effect on the way in which items are displayed thereafter.

    How I would deal with the table is like this:

    ";
    }
    ?>
    
  • change the order of a table with another table

    I want to change the order of a 1 d table based on another table 1 d that specifies the order.  For example, I have a table including the following items: 12, 13, 14, 15, 16.  And I have another 1 d array that specifies the order of 3, 4, 0, 1, 2.  I want the table resulting in 15, 16, 12, 13, 14.  How can I do this?  It must be really easy.  Another example, I give myself a table in the order following 1,2,3,4,5,6,7 and I an order specifying the array containing the 0,6,1,5,2,3,4.  Therefore, the resulting table must be 1,7,2,6,3,4,5.  ???

    It is, in fact, quite easy.  Put an "Array Index" inside a loop and thread the two tables in it.  Disabled automatic indexing on the input array.  Wire of the array element located on the border of the for loop, and you'll have the desired table.

  • Maybe you are looking for

    Venue City State Date/Time
    {$show['Location']}{$show['City']} {$show['State']}{$show['Date']}