pdo-debug icon indicating copy to clipboard operation
pdo-debug copied to clipboard

A typo in the README

Open colshrapnel opened this issue 9 years ago • 1 comments

You have a typo in the docs that confused some unsuspecting fellow who came to Stack Overflow, scared by the fact that pdo-debug is not using prepare().

It's better to change the line

$sql = "INSERT INTO test (col1, col2, col3) VALUES (:col1, :col2, :col3)";

to

$query = $pdo->prepare("INSERT INTO test (col1, col2, col3) VALUES (:col1, :col2, :col3)");

just for clarity

colshrapnel avatar Oct 14 '16 14:10 colshrapnel

Thanks, I'll do that! But to be fair, it says

$sql = "INSERT INTO test (col1, col2, col3) VALUES (:param1, :param2, :param3)"; $query = $database_connection->prepare($sql); $query->execute($parameters);

so these guys will become unconfused by reading one line line further :)

panique avatar Oct 17 '16 14:10 panique