I am using a simple test table to upgrade a website from mySQL to PHP7 which is outside of my control.
This is a test case for a user log in. I want the whole row not the userID. It contains users access levels and last time logged in to update. Otherwise I could have obtained a single field of the record.
[vode]<?
$pdo = connectDB();
$Name = "Diana";
$stmt = $pdo->query("SELECT * FROM PDO WHERE Name_F = '" . $Name . "'");
$count = $stmt->rowCount();
if($count ==1) // Will be one.
{
$row = $stmt->fetch())
echo $row['Name_F'] . "<br>";
echo "Music count = " . $count; // Should be 1
}
?>[/code]