Artists

- The simplest example selects an entire table, and displays one column in a list.

This is a list of all the artist's names in the Artists table.

Page will display:

Miya Ando
Gustav Klimt
Marc Chagall
Franz Marc
Paul Klee
Willem de Kooning
Barnett Newman
Wassily Kandinsky
Ellsworth Kelly
Al Held
Frida Kahlo
Arshile Gorky
Edvard Munch
Louisa Matthíasdóttir
Hans Hofmann
Isamu Noguchi
Alexander Calder
Thornton Willis
Mark Rothko

Code

Copy and paste this PHP code into a page or post in WordPress.

The [insert_php] symbols will make the code run on the page.

[insert_php]
$query = new AirpressQuery();
$query->setConfig("Artists_DB");
$query->table("Artists");
$data = new AirpressCollection($query);

echo "<ul >";
foreach($data as $row){
    echo ("<li />");
    echo $row["Name"]."<br>";
    echo ("</li />");
}
echo "</ul >";
[/insert_php]