$query = $database->prepare('SELECT * FROM table WHERE column LIKE ?');
<?php // Get the keyword from query string $keyword = $_GET['keyword']; // Prepare the command $sth = $dbh->prepare('SELECT * FROM `users` WHERE `firstname` LIKE :keyword'); // Put the percentage sing on the keyword $keyword = "%".$keyword."%"; // Bind the parameter $sth->bindParam(':keyword', $keyword, PDO::PARAM_STR); ?>