This question already has an answer here:
- How can I prevent SQL-injection in PHP? 28 answers
Please look into the below code. SQLite3 PHP - SQLite-PDO
$sql = 'SELECT * FROM employee WHERE name IN (:v1, :v2, :v3)';
$statement = $connection->query($sql);
$statement->bindValue(':v1','manash');
$statement->bindValue(':v2','ram');
$statement->bindValue(':v3','rahim');
for($i=0;$i<$statement->columnCount();$i++){
$statement->getColumnMeta($i)
}
Aucun commentaire:
Enregistrer un commentaire