The following SQL statement returns an error. What is wrong with it? The error is stated as being near 'ON DUPLICATE KEY UPDATE foo_no='$data[1]', alt_no='$data[2]', descript='$data[3]', pr' "INSERT INTO `foobar2` SET part_no='$data[0]', foo_no='$data[1]', alt_no='$data[2]', descript='$data[3]', price='$data[4]', unit_sale='$data[5]', unit_issue='$data[6]', weight='$data[7]', brand='$data[8]', nla_tag='0' ON DUPLICATE KEY UPDATE foo_no='$data[1]', alt_no='$data[2]', descript='$data[3]', price='$data[4]', unit_sale='$data[5]', unit_issue='$data[6]', weight='$data[7]', brand='$data[8]', nla_tag='0'" This is passed in a PHP script so the line ending ';' is not present. I'm getting better at writing SQL statements but sometimes it just throws me a total curved ball! -- Mark Benson http://homepage.mac.com/markbenson -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php