Hi Mentioned the fields list in select statement and insert into than check will work. $query_is = "INSERT INTO(field1, field2) irs_query SELECT field1, field2 ON DUPLICATE KEY UPDATE FROM irs_rawdata WHERE EIN = '$fin'"; Thanks, Muthukumar Selvarasu, Project Manager (Web Development), Webmasters Ltd. From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Christopher E Sent: Thursday, January 10, 2008 2:28 PM To: [email protected] Subject: [php_mysql] INSERT INTO ... SELECT * ON DUPLICATE KEY UPDATE issue! Hello all,
Issue is: its not inserting the information into the table, I am using this in another part of my code and it works great but in this part I need to use the ON DUPLICATE KEY UPDATE as there may already be the record in the table, once the record is move I have it delete base on the affected row 1 or 0. the code I have is: $query_is = "INSERT INTO irs_query SELECT * ON DUPLICATE KEY UPDATE FROM irs_rawdata WHERE EIN = '$fin'"; $result_is = mysql_query($query_is); $count = mysql_affected_rows(); Any help would be grrateful Sincerely, Christopher [Non-text portions of this message have been removed]
