get($id1, $id2 = null)

Takes as input a value for the primary key(s) of the table (one or two primary keys only). Queries the database for this record. Sets variables based on these values.

Leaves the class variable unset if the query returns a null value for the column.

Example:

example.php
<?php
include("lib.php");
load("person");

$p = new person();
$p->get($_GET['person_id']);

echo 
$p->name;
?>