help me out

Discussion in 'PHP' started by dangutm, Aug 23, 2007.

  1. #1
    good time
    please help me with the php code that feach data from a table and automaticaly insert it in another table withen the same database(mysql).
     
    dangutm, Aug 23, 2007 IP
  2. sea otter

    sea otter Peon

    Messages:
    250
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #2
    To create a new table with the same schema as an existing table, use

    
    CREATE TABLE [b]new_table_name[/b] LIKE [b]orig_table_name[/b]
    
    Code (markup):
    You can then copy over all the records from the original table like so:
    
    INSERT INTO [b]new_table_name[/b] SELECT * FROM [b]orig_table_name[/b]
    
    Code (markup):
     
    sea otter, Aug 23, 2007 IP
  3. webboy

    webboy Peon

    Messages:
    109
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Trigger could do that ever time a record is updated it will update the other table
     
    webboy, Aug 24, 2007 IP