Collections

- The next three examples display the same data, three different ways.

The Collections table has the names of the each collections. A sort parameter is used to sort alphabetically.

Page will display:

Color Field
Minimalism
Sculpture
Symbolism and Symbology
Transcontinental Legacy

Code

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

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

[insert_php]
$query = new AirpressQuery();
$query->setConfig("Artists_DB");
$query->sort("Name", "asc");
$query->table("Collections");
$data = new AirpressCollection($query);

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