Quite simply... How can I merge these two queries into one?
$sql = "UPDATE `data` SET `views` = `views` + 1 WHERE `id`=$id AND `source`='$source' AND `keyword`='$keyword'";
$sql = "UPDATE `settings` SET `count` = `count` + 1 WHERE `id`=$id";
EDIT:
Also, there's the matter of the first time data is entered, when the data to update does not yet exist in the data table.
My insert Query:
$sql = "INSERT INTO `_data` (`id`, `source`, `keyword`, `views`) VALUES ($id,'$source','$keyword',1)";
Is it possible to combine an insert of new data to one table, with an update to another table?