setLogging(false); $as2db->setEMailOnError(false); } } return $as2db; } ?> 'Username', 3 => 'Apples', 4 => 'Bananas', 5 => 'Cherries'); $dir = GDO::getWhitelistedDirS($dir, 'DESC'); if (!in_array($orderby, $whitelist)) { return htmlDisplayError('Error 1010101: Not in whitelist.'); } $orderby = $db->escape($orderby); $query = "SELECT * FROM users ORDER BY $orderby $dir LIMIT 10"; if (false === ($rows = $db->queryAll($query))) { return false; } $headers = array( array('#'), array('Username', '1', 'ASC'), array('Apples', '3', 'DESC'), array('Bananas', '4', 'DESC'), array('Cherries', '5', 'DESC'), ); echo '
%d | ', $i++); echo sprintf('%s | ', $row['username']); echo sprintf('%s | ', $row['apples']); echo sprintf('%s | ', $row['bananas']); echo sprintf('%s | ', $row['cherries']); echo GWF_Table::rowEnd(); } echo '