예제 #1
0
 function sortByStep($dbh)
 {
     $order = "stepno";
     $stmt = $dbh->prepare("select * from " . Step::$tableName . " ORDER BY {$order}");
     $stmt->execute();
     $result = array();
     while ($row = $stmt->fetch()) {
         $p = new Step();
         $p->copyFromRow($row);
         $result[] = $p;
     }
     return $result;
 }