Mysql: insert if row doesn't exist, else update.. is there a simpler command?
Try
$user_id = $user_data[0]['user_id'];
$logo_id = $mysqli->real_escape_string($_GET['logo_id']);
$sql = "INSERT INTO results (user_id, logo_id, result_tries)
VALUES ('$user_id', '$logo_id', 0)
ON DUPLICATE KEY UPDATE result_tries = result_tries + 1";
$mysqli->query($sql);