$1

\n", $pee); // make paragraphs, including one at the end if ($br) $pee = preg_replace('|(?)\s*\n|', "
\n", $pee); // optionally make line breaks return $pee; } $expl = explode("/",$HTTP_SERVER_VARS["REQUEST_URI"]); $race_id = $expl[2]; if ($expl[2] < 1) { $race_id = "60"; } ?> Gotham Gazette - Eye On Albany: Campaign Trail 2006

You are using an old browser: This site will look much better in a browser that supports web standards, but it is accessible to any browser or Internet device. Firefox is an excellent, free, browser for all types of operating systems.

query($sql); if(DB::IsError($q)) { die($q->getMessage()); } // if no error, script continues $result = $q->fetchRow(); $id = $result[0]; $title = $result[1]; $ge_winner = $result[2]; $p_winner = $result[3]; $dist_switch = $result[4]; ?>
"; if ($race_id > 51) { echo $title.""; echo '
'; echo '

Know about something you don\'t see here? Let us know at info@gothamgazette.com

'; } else { echo'

The Race ...

'; echo $title.""; echo '
'; echo '

Know something we should know? Let us know at info@gothamgazette.com

'; } ?>

Campaign Trail ...

query($sql); if(DB::IsError($q)) { die($q->getMessage()); } */ if ($race_id == 60) { $sql = "SELECT title, date, blurb, link, source FROM trail WHERE onhome = 1 order by date desc"; //echo $sql; } else { $sql = "SELECT title, date, blurb, link, source from trail where race_id=$race_id order by date desc"; } if ( DB:: isError ($res = $con -> query ($sql))){ die ( DB :: errorMessage ($res )); } // $from is received for example as url param: // http://www.host.com/list.php?from=50 // $limit is the number of rows you want to display per page $from = $_GET["from"]; $limit = 10; $pager = new DB_Pager ($res, $from, $limit); // $data now contains all the data needed to build // for example, links and displaying info to the user $data = $pager -> build (); if ( DB :: isError ($data )){ die ( DB :: errorMessage ($data )); } if (! $data ) { die ( 'There were no results' ); } $con->disconnect(); // Automatically fetch only the rows for this page. // fetchInto() is also avaible while ( $row = $pager -> fetchRow (DB_FETCHMODE_ASSOC )){ $date_arr = explode("-",$row[date]); $mydate = $date_arr[0].$date_arr[1].$date_arr[2]; $datem = date("m/d/y",mktime(0,0,0,$date_arr[1],$date_arr[2],$date_arr[0])); // echo '

'.$row[title].' //
'.autop($row[blurb]).'

'.$datem.' ('.$row[source].')

'; $description = "".$datem."
".$row[blurb]; $src = "(".$row[source].")"; $blurb = autop($description." ".$src); echo "

".$row[title]."
".$blurb."

"; } //echo (""); ?> 5) { $race_id == ""; } // Display data (only few examples) //echo $data ['numrows'] . ' Results found
' ; echo '

<<-prev '; echo'Page'. $data['current'].' of '.$data['numpages'].' '; //echo $data ['limit']. ' results per page
'; // Next button echo ' next->>

'; // Direct link to pages //foreach ( $data['pages'] as $page => $start_row ) { //echo " $page" ; //} //echo ''; ?>