modx->query


$rows= array();
$stmt= $modx->query("SELECT * FROM `academic` ORDER BY rand() LIMIT 25");
if ($stmt) {
      // loop through the result set and inspect one row at a time
    foreach ($stmt->fetchAll(PDO::FETCH_ASSOC) as $row) {
        array_push($rows, $row);
    }
}