Figured it out right after I posted:
$query = $database->prepare('SELECT * FROM table WHERE column LIKE ?');
$query->execute(array('value%'));
while ($results = $query->fetch())
{
echo $results['column'];
}
More Related Contents:
- Can I mix MySQL APIs in PHP?
- Can PHP PDO Statements accept the table or column name as parameter?
- Can I bind an array to an IN() condition in a PDO query?
- How to apply bindValue method in LIMIT clause?
- PDOException “could not find driver”
- Row count with PDO
- How to prevent duplicate usernames when people register?
- PDO valid characters for placeholders
- Binding multiple values in pdo
- PDO Parameterized Query – Reuse named placeholders?
- pdo prepared statements with wildcards
- Get last insert id after a prepared insert with PDO
- Insert multiple rows with PDO prepared statements
- Do SQL connections opened with PDO in PHP have to be closed
- What is the advantage of using try {} catch {} versus if {} else {}
- Alternative for mysql_num_rows using PDO
- ERROR: SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it
- Call to undefined method PDO::execute()
- Unknown database error in PHP but it exists in PHPMyAdmin
- How do detect that transaction has already been started?
- return one value from database with mysql php pdo
- Trying to access array offset on value of type bool
- LIKE query using multiple keywords from search field using PDO prepared statement
- return multiple response data in one response
- How to get a query error from prepare() in PDO PHP?
- PDO lastInsertId() always return 0
- Do PHP PDO prepared statements need to be escaped?
- How can I pass an array of PDO parameters yet still specify their types?
- PHP PDO how to run a multiple query request?
- Difference between PDO->query() and PDO->exec()