/*
date | timestamp without time zone | not null default now()
device | character varying(32) | not null
sensor | character varying(32) | not null
value | character varying(32) | not null
unit | character varying(32) | not null
sensortype | character varying(32) | not null
remoteip | character varying(15) | not null
*/
echo ("Last 1000
");
$conn = pg_connect("dbname=quantifiedself port=5432");
$result = pg_query($conn, "select * from data;");
$num = pg_numrows($result);
$col_num = pg_numfields($result);
// Only show last...
if (isset($_GET["limit"]) && $_GET["limit"] < 1000000)
{
$limit = $_GET["limit"];
}
else
{
$limit = $num;
}
echo "
$col_value | \n"; } } echo "