I have this $search= mysqli_real_escape_string($conn,$_POST['search']); Now, I want to know if this can be converted into int and would that be a safe option to avoid sql injection.
$sql ="SELECT * FROM basket WHERE quantity =$search";
**here quantity is int