When i try to update my db records with a DBSave action it inserts instead of updating excisting record.
[attachment=0]example.jpg[/attachment]
I use as 'Update conditions';
<?php
$db = JFactory::getDbo();
$sql = "UPDATE band_Uitslagen_VR SET
poule=".$form->data['poule'].", //should insert if not excists or replace if excists
naam=".$form->data['naam'].", //should insert if not excists or replace if excists
tm=".$form->data['tm'].", //should insert if not excists or replace if excists
p_id=".$form->data['p_id'].", //should insert if not excists or replace if excists
car=car+".$form->data['car'].", // should add value to excisting value
brt=brt+".$form->data['brt'].", // should add value to excisting value
hs={ $max: {hs:[".$form->data['hs']."]} }, // should add value if value is higher
gesp=gesp+".$form->data['gesp']." // should add value to excisting value
WHERE
p_id=".$form->data['p_id']."'';
$db->setQuery$sql);
$result = $db->query();
?>
What am i doing wrong here??
Regards Theon
PS. In a second DBSAVE this all has to be INSERTED in ANOTHER db on same server.
In this db it should UPDATE .
At the moment i only use the Updating DBSave for testing