#1
|
PDOStatement::fetchAll
|
(/* $exec_statement = "CREATE TABLE fruit (name, colour, calories INT); INSERT INTO fruit VALUES ('apple', 'red', 150), ('banana', 'yellow', 250), ('kiwi', 'brown', 75), ('lemon', 'yellow', 25), ('orange', 'orange', 300), ('pear', 'green', 150), ('watermelon', 'pink', 90)" */ /* $statement = "SELECT name, colour FROM fruit" */ /* $driver_options = [PDO::ATTR_CASE => PDO::CASE_UPPER] */)
|
#2
|
PDOStatement::fetchAll
|
(/* $exec_statement = "CREATE TABLE fruit (name, colour, calories INT); INSERT INTO fruit VALUES ('apple', 'red', 150), ('banana', 'yellow', 250), ('kiwi', 'brown', 75), ('lemon', 'yellow', 25), ('orange', 'orange', 300), ('pear', 'green', 150), ('watermelon', 'pink', 90)" */ /* $statement = "SELECT name, colour FROM fruit" */ PDO::FETCH_COLUMN, 0)
|
#3
|
PDOStatement::fetchAll
|
(/* $exec_statement = "CREATE TABLE fruit (name, colour, calories INT); INSERT INTO fruit VALUES ('apple', 'red', 150), ('banana', 'yellow', 250), ('kiwi', 'brown', 75), ('lemon', 'yellow', 25), ('orange', 'orange', 300), ('pear', 'green', 150), ('watermelon', 'pink', 90), ('apple', 'green', 150), ('pear', 'yellow', 150)" */ /* $statement = "SELECT name, colour FROM fruit" */ PDO::FETCH_COLUMN | PDO::FETCH_GROUP)
|
#4
|
PDOStatement::fetchAll
|
(/* $exec_statement = "CREATE TABLE fruit (name, colour, calories INT); INSERT INTO fruit VALUES ('apple', 'red', 150), ('banana', 'yellow', 250), ('kiwi', 'brown', 75), ('lemon', 'yellow', 25), ('orange', 'orange', 300), ('pear', 'green', 150), ('watermelon', 'pink', 90)" */ /* $statement = "SELECT name, colour FROM fruit" */ PDO::FETCH_CLASS)
|
#5
|
PDOStatement::fetchAll
|
(/* $exec_statement = "CREATE TABLE fruit (name, colour, calories INT); INSERT INTO fruit VALUES ('apple', 'red', 150), ('banana', 'yellow', 250), ('kiwi', 'brown', 75), ('lemon', 'yellow', 25), ('orange', 'orange', 300), ('pear', 'green', 150), ('watermelon', 'pink', 90)" */ /* $statement = "SELECT name, colour FROM fruit" */ PDO::FETCH_FUNC, "fruit")
|