PHP·98 questions

How to execute a PDO query?

Answer
$pdo->query() — without parameters.
$pdo->prepare() + execute() — with parameters.
fetch() — one row.
fetchAll() — all rows.
Modes: FETCH_ASSOC, FETCH_OBJ.
Was this answer helpful?

More questions in this topic

Related questions from other topics