<?php
$sql = "SELECT `ingredient_name` FROM `ingredients`";
$ingredients = $pdo->query($sql)->fetchAll(PDO::FETCH_COLUMN);
More Related Contents:
- PHP/SQL Insert Error when using Named Placeholders
- mysqli or PDO – what are the pros and cons? [closed]
- PDOException SQLSTATE[HY000] [2002] No such file or directory
- How to get numeric types from MySQL using PDO?
- How can I use PDO to fetch a results array in PHP?
- PHP PDOException: “SQLSTATE[HY093]: Invalid parameter number”
- Causes of MySQL error 2014 Cannot execute queries while other unbuffered queries are active
- Use bound parameter multiple times
- MySQL check if a table exists without throwing an exception
- how safe are PDO prepared statements
- Replacing mysql_* functions with PDO and prepared statements
- PDO + MySQL and broken UTF-8 encoding
- Is there a way to fetch associative array grouped by the values of a specified column with PDO?
- PDOstatement (MySQL): inserting value 0 into a bit(1) field results in 1 written in table
- php code to test pdo is available?
- Understanding pdo mysql transactions
- Calling stored procedure with Out parameter using PDO
- When *not* to use prepared statements?
- How to insert an array into a single MySQL Prepared statement w/ PHP and PDO
- Setting a connect timeout with PDO
- In PHP with PDO, how to check the final SQL parametrized query? [duplicate]
- What is the best way to insert multiple rows in PHP PDO MYSQL?
- PDO MySQL: Insert multiple rows in one query
- How to bind LIKE values using the PDO extension?
- Warning: PDO::__construct(): [2002] No such file or directory (trying to connect via unix:///tmp/mysql.sock) in
- PDO::rowCount VS COUNT(*)
- PHP 7 RC3: How to install missing MySQL PDO
- PHP: mysql v mysqli v pdo [closed]
- PDO and MySQL ‘between’
- MySQL PHP – SELECT WHERE id = array()? [duplicate]