php print fetch

Solutions on MaxInterview for php print fetch by the best coders in the world

showing results for - "php print fetch"
Omar
24 Jan 2017
1
2<?php
3$sth $dbh->prepare("SELECT name, colour FROM fruit");
4$sth->execute();
5
6/* Exercise PDOStatement::fetch styles */
7
8print("PDO::FETCH_OBJ: ");
9print("Return next row as an anonymous object with column names as properties\n");
10$result $sth->fetch(PDO::FETCH_OBJ);
11print $result->name;
12print("\n");
13?>
14
15
queries leading to this page
php print fetchobject php print fetch