Insert data into single table from multiple tables

Discussion in 'PHP' started by greatthings, Dec 5, 2011.

  1. #1
    I am trying to insert data from different tables into single table

    data to be inserted has an array value, how can i do that?? hmmmmmmmmmmm ;(
     
    greatthings, Dec 5, 2011 IP
  2. jenokz

    jenokz Greenhorn

    Messages:
    46
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #2
    You should at least give an example of your data structure and the array value you mention about.
     
    jenokz, Dec 5, 2011 IP
  3. madmod001

    madmod001 Peon

    Messages:
    14
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    example are good
    also is it for production or admin is also helpful
    good luck
     
    madmod001, Dec 7, 2011 IP
  4. qhm

    qhm Peon

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Are you trying to say that you are getting data from different tables to an array and then trying to insert that array into another table?
     
    qhm, Dec 7, 2011 IP
  5. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #5
    In pure SQL, or in PHP. It's trivial in PHP - just do selects on the "multiple tables" and fill PHP variables, then do one insert statement using those variables. (Or learh the SQL for including a select in an insert.)
     
    Rukbat, Dec 10, 2011 IP