PDO::FETCH_ASSOC
returns a row from the result set. The parameter PDO::FETCH_ASSOC
tells PDO to return the result as an associative array.
The array keys will match your column names. If your table contains columns 'email' and 'password', the array will be structured like:
Array
(
[ActivationCode] => 'this_is_code'
)
To read data from the 'ActivationCode' column, do:
$row['ActivationCode'];
How likely is returning only 1 record thus, if you want to compare something, you can use:
if($row['ActivationCode'] == 'xxxxx'){
// your code
}
Font: PDO::FETCH_ASSOC