$results=$pdo->query("SELECT * FROM user");
$rows=$results->fetch(PDO :: FETCH_ASSOC);
But what if I want to take a single element, which method can I insert instead of"???" to return the string?
$result=$pdo->query(" SELECT name FROM user WHERE id=2");
$row=$results->???;
– Nuclear86 Jul 14 '19 at 15:07