Page 1 of 1

"INSERT ... ON DUPLICATE KEY UPDATE" Syntax

Posted: Mon Apr 15, 2013 8:02 pm
by D630
Hi,

In "After Save" i run this code to modify a another table :

Code: Select all

$sql  = "INSERT INTO verbindung (";
$sql .= "formal_Erschliessung_ID)";
$sql .= "VALUES (";
$sql .= "'$recordID')";
nuRunQuery($sql); 
This works fine. Now i would like to change it into a "INSERT ... ON DUPLICATE KEY UPDATE" Syntax, but i can not get at it. Can anybody give me a helping hand?

Thanks.

Re: "INSERT ... ON DUPLICATE KEY UPDATE" Syntax

Posted: Wed Apr 17, 2013 9:32 am
by admin
D630,

Using nuDebug() should help you find the problem.

http://wiki.nubuilder.com/tiki-index.ph ... g_pString_

Steven