- if (SQL_NUMROWS($result) > 0) {
- $OUT = ''; $SW = 2;
- // @TODO This should be somehow rewritten to $row = SQL_FETCHARRAY(), see switch() block above for SQL queries
- while (list($tid, $userid, $points, $reason, $stamp) = SQL_FETCHROW($result)) {
- // Rewrite points
- if ($type == 'OUT') $points = $points . '-';
+ if (!SQL_HASZERONUMS($result)) {
+ $OUT = '';
+ while ($content = SQL_FETCHARRAY($result)) {
+ // Rewrite points, out is subtracted
+ if ($type == 'OUT') {
+ $content['points'] = $content['points'] * -1;
+ } // END - if