Hello,
How can I add a record into the table if it doesn't exist while updating other records.
Here is the query:
for ($i=1;$i<=$kn;$i++) {
mysql_query("UPDATE ofsp_table SET knpk='$knpk[$i]',knloy='$knloy[$i]' WHERE parid = '$ID' LIMIT 1");
}
This will only update records which already exist. However, what if there's one more record which doesn't exist? I'd like to add that record. How may I do so?