Hope this helps some one. All sorted now Insert routine worked fine, but the Update errored with "1-1" for key 'Primary'. Managed to change the php to the following...
// check to see if the record actually exists in the database // (modified to include composite primary key) $query_recordset = sprintf("SELECT * FROM `table/view` WHERE firstid = %s AND secondid = %s", GetSQLValueString($_REQUEST["firstid"], "int"), GetSQLValueString($_REQUEST["secondid"], "int") ... // build and execute the update query //(modified to include composite primary key) $row_recordset = mysql_fetch_assoc($recordset); $query_update = sprintf("UPDATE `table/view` SET attribute1 = %s WHERE firstid = %s AND secondid = %s", GetSQLValueString($_REQUEST["attribute1"], "text"), GetSQLValueString($row_recordset["firstid"], "int"), GetSQLValueString($row_recordset["secondid"], "int") ); ... // return the updated entry //(modified to include composite primary key) $toret = array( "data" => array( array( "firstid" => $row_recordset["firstid"], "secondid" => $row_recordset["secondid"], # "attribute1" => $_REQUEST["attribute2"]# ... Okay, done!