URL\" ORDER BY Date DESC" ); } function previousPageId() : int { $foundId = Table::_get_all( "Webpages", "Database\Webpage", "WHERE URL = \"$this->URL\" AND Date < \"$this->Date\" ORDER BY Date DESC LIMIT 1", "WID" ); if (count($foundId) > 0) { return $foundId[0]->WID; } return 0; } function nextPageId() : int { $foundId = Table::_get_all( "Webpages", "Database\Webpage", "WHERE URL = \"$this->URL\" AND Date > \"$this->Date\" ORDER BY Date ASC LIMIT 1", "WID" ); if (count($foundId) > 0) { return $foundId[0]->WID; } return 0; } function incrementVisits() { Table::_update( 'Webpages', "Visits = \"" . ($this->Visits + 1) . "\"", "WID = \"{$this->WID}\"" ); } }