$pg_connection = pg_connect("host=localhost port=5432 dbname=rantburg user=fpruitt password=S00perd00per") or die ("Unable to connect to Postgres server!");
pg_set_client_encoding($pg_connection, 'UTF8');
?>
limit 100
pfrom 2002-05-09
pto 2018-05-06
contains1 Scott Beauchamp
Search Submit
Search Rantburg
if($Search != ''){
$i=1;
if($contains1 != ''){
$contains1="'%" . trim($contains1) . "%'";
//$contains1 = preg_replace('/\s+/', '', $contains1);
$contains1=str_replace(',',"%' or lower(rquote) like '%",$contains1);
$contains1=strtolower($contains1);
}
echo "";
$ssql="select id,rdate,rbanner from ";
$ssql .= "(select * from tbltwar where rdate >= '$pfrom' and rdate <= '$pto') as y ";
if($contains1 != ''){
$ssql .= "where lower(rquote) like $contains1 ";
}
$ssql .= " order by id desc limit $limit";
echo $ssql;
$result = pg_query($ssql) or die ("Error in query: $ssql. " . pg_last_error());
while($row = pg_fetch_object($result)){
echo "\n";
echo "" . $i++ . " | ";
echo "
id . "\" target=_blank>" . $row->id ." | ";
echo "" . date("m/d/Y",strtotime($row->rdate)) . " | ";
echo "" . $row->rbanner . " | ";
echo "
\n";
}
echo "
";
}
?>
pg_close($pg_connection);
?>
function isChecked($x,$y){
if($x==$y)
return "Checked";
return "";
}
?>