RE: Spot the deliberate mistake...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 
On Thursday, December 16, 2004, at 05:21PM, Norland, Martin <Martin.Norland@xxxxxxxxxx> wrote:

>"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;"
>
>It's implicit that you use the same data regardless, you're saying "if
>it's already there, just do an update statement with the data already
>provided".

If I try that it returns:

You have an error in your SQL syntax near 'ON DUPLICATE KEY UPDATE' at line 1

so I guess something doesn't work there. I also tried it with and without the line ending and it didn't work either way :).

-- 
Mark Benson

http://homepage.mac.com/markbenson

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux