0)) { $start = 0; } // No of records to be shown per page. $eu = ($start -0); $limit = 1; $this1 = $eu + $limit; $back = $eu - $limit; $next = $eu + $limit; // We have to find out the number of records in our table to break the pages $query2="select da.fID as dayID, date_format(da.fDate, '%Y-%m-%d') as dayDate, re.fID as reportID, re.fTitle as DayTitle, re.fPreface as DayPreface, re.fText as Text, re.frAuthorID as authorID, re.frLanguageID as languageID, re.fMainID as mainID, re.fStatusID as statusID, dare.frTripID, dare.frDayID, dare.frReportID, dare.frFotoID, fo.fID, fo.fFilename as Foto, la.fID, la.fShort from kfmDay da inner join kfmDayReport dare on dare.frDayID = da.fID inner join kfmReport re on re.fID = dare.frReportID left outer join kfmFoto fo on fo.fID = dare.frFotoID inner join comLanguage la on la.fID = re.frLanguageID where re.frLanguageID = 1 and re.fStatusID = ".$statusID." and dare.frTripID = ".$tripID." group by re.fID order by da.fDate asc"; $result2=mysql_query($query2); echo mysql_error(); $nume=mysql_num_rows($result2); // Now let us start executing the query with variables $eu and $limit set at the top of the page $query="select da.fID as dayID, date_format(da.fDate, '%d.%m.%Y') as dayDate, re.fID as reportID, re.fTitle as DayTitle, re.fPreface as DayPreface, re.fText as Text, re.frAuthorID as authorID, re.frLanguageID as languageID, re.fMainID as mainID, re.fStatusID as statusID, dare.frTripID, dare.frDayID, dare.frReportID, dare.frFotoID, fo.fID, fo.fFilename as Foto, la.fID, la.fShort, de.fID, de.fTripTitle as TripTitle, trda.frTripID, trda.frTripDetailsID from kfmDay da inner join kfmDayReport dare on dare.frDayID = da.fID inner join kfmReport re on re.fID = dare.frReportID left outer join kfmFoto fo on fo.fID = dare.frFotoID inner join comLanguage la on la.fID = re.frLanguageID inner join kfmTripData trda on trda.frTripID = dare.frTripID inner join kfmTripDetails de on de.fID = trda.frTripID where re.frLanguageID = 1 and re.fStatusID = ".$statusID." and dare.frTripID = ".$tripID." group by re.fID order by da.fDate asc limit $eu, $limit"; $result=mysql_query($query); echo mysql_error(); // Variables set for advance paging // This should be more than $limit and set to a value for which links to be breaked $p_limit=800; // To take care global variable if OFF $p_f=$_GET['p_f']; // This variable is set to zero for the first page if(!($p_f > 0)) { $p_f = 0; } $p_fwd=$p_f+$p_limit; $p_back=$p_f-$p_limit; ?> Komm flieg mit // The trip begins here

//