// Pull Information: MySQL #$queryString = "SELECT id, notifyType, time, text FROM pvp_notifications WHERE userid='" . $this->User->getClassVar('userID') . "' AND username='" . $this->User->getClassVar('username') . "' AND time > '0' ORDER BY id DESC LIMIT " . $this->User->getUserData('rowsPerPage'); $query = $this->db->query("SELECT id, notifyType, time, text FROM pvp_notifications WHERE userid='3' AND username='testbot' AND time > '0' ORDER BY id DESC LIMIT 10"); echo $queryString . "
"; echo $query->num_rows; // If Number of Result Rows, is Less than one, then no notifications exist. if ($query->num_rows() < 1) { $thisDay = $this->general->makeDate($this->general->getCurTime(), $this->User->getUserData('timeZone')); echo "
" . $thisDay . "
"; echo "
No Notifications
"; } else { // Else Loop into array and print. foreach ($query->result_array() as $row) { // Determines the BGColor Hex Code if ($i % 2 == 0) { $BGColor = "232323"; } else { $BGColor = "1b1b1b"; } // Set Time Variables $notDay = $this->general->getDay($row['time'], $this->User->getUserData('timeZone')); $notTime = $this->general->makeDate($row['time'], $this->User->getUserData('timeZone')); // If Emtpy, then new time. if (empty($curDay) || $curDay != $notDay) { $curDay = $notDay; $curYear = $notYear; echo"
" . $notTime . "
"; } // Print Information echo"
"; echo"" . $this->Notifications->getType($row['type']) . ": " . $row['text'] . ""; echo"X
"; // ++ $i++; } }