PDOを使用すると、生活がとても楽になります
$pdo = new PDO(...);
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$stmt = $pdo->prepare('SELECT * FROM news WHERE lead_story = ?');
$stmt->bindParam(1, $leadStory);
$stmt->execute();
$allRows_News = $stmt->fetchAll();
$totalRows_News = count($allRows_News);