Is this enough to be safe from SQL injections:
$value1 = htmlspecialchars($_GET['input1'], ENT_QUOTES, 'UTF-8');
$value2 = intval($_GET['input2']);
SELECT xy FROM a WHERE a = '$value1' AND b = $value2;
Eg.: Every string input is in '...' and every non-string input is converted to number via intval / doubleval.
Query is run over mysqli_