RE: [PHP-DB] Retrieve data, add new fields and enter it in new table

2004-06-22 Thread Justin.Baiocchi
Every [mailto:[EMAIL PROTECTED] Sent: Wednesday, 23 June 2004 4:36 AM To: Baiocchi, Justin (LI, Armidale); [EMAIL PROTECTED] Subject: RE: [PHP-DB] Retrieve data, add new fields and enter it in new table Let's say you want to build a table with a couple extra fields, say the name associated w

RE: [PHP-DB] Retrieve data, add new fields and enter it in new table

2004-06-22 Thread Gary Every
Let's say you want to build a table with a couple extra fields, say the name associated with the id, and today's date Try: CREATE TABLE new_table SELECT t1.id, t2.id_name, NOW() FROM table1 t1, table2 t2 WHERE t1.id=t2.id This will build a table with all the id's from table1 that have an associa