$stmt = $conn->prepare('SELECT * FROM users WHERE user_id = :user_id');
$stmt->execute(array(':user_id' => $_GET['user_id']));
$result = $stmt->fetchAll(PDO::FETCH_OBJ);
I'm using PDO like that, do I need to sanitise GET parameter?
I know if I do $stmt->bindParam(':user_id', $_GET['user_id'], PDO::PARAM_INT);
than it is not a problem. But is my way safe?