All pastes #459904 Raw Edit

Stuff

public text v1 · immutable
#459904 ·published 2007-04-26 19:22 UTC
rendered paste body
<?php
if ($_POST['submit'] || ($_POST['txtday1'] && $_POST['txtmonth1'] && $_POST['txtyear1']) != "" )
{
	$operator = $_POST['operator'];
	$txtvoltage = $_POST['txtvoltage'];
	$txtday1=$_POST['txtday1'];
	$txtmonth1=$_POST['txtmonth1'];
	$txtyear1=$_POST['txtyear1'];
	$txthr1=$_POST['txthr1'];
	$txtmin1=$_POST['txtmin1'];
	$txtday2=$_POST['txtday2'];
	$txtmonth2=$_POST['txtmonth2'];
	$txtyear2=$_POST['txtyear2'];
	$txthr2=$_POST['txthr2'];
	$txtmin2=$_POST['txtmin2'];
	
	/* 
	$thedate1 = $txtyear1 .'-'. $txtmonth1 .'-'.  $txtday1; */
	/* $datevalue = date("Y-m-d",$thedate); */
	
	
	include "pgsql.class.php";
$pgsqldb = new pgsql("localhost","task","tele","tiny");
$pgsqldb->connect();

$pgsqldb->query('SELECT result_time as "Result Time",voltage as "Voltage" FROM sample_mts310 WHERE nodeid =2 AND voltage '.$operator.' '.$txtvoltage.' ORDER BY result_time DESC LIMIT 25');


echo $pgsqldb->getResultAsTable();
}else {
	echo " ERROR : EMTPY FIELD MAYBE !";
}
?>