Reading on pdo.
What are these for and what do they mean ? I still on procedural style programming.
->
=>
For example:
[code]
$stmt = $pdo->prepare(‘SELECT * FROM users WHERE email = ? AND status=?’);
$stmt->execute([$email, $status]);
$user = $stmt->fetch();
// or
$stmt = $pdo->prepare(‘SELECT * FROM users WHERE email = :email AND status=:status’);
$stmt->execute([’email’ => $email, ‘status’ => $status]);
$user = $stmt->fetch();
What does this mean ?
[code]
$user = $stmt->fetch();
Ok, it means, after fetching the result, dump it onto $user.
But what exactly “->” mean ? Does it mean “do this afterwards” or “do this after that” ?