<?
require("/www/globals/survey/db_connect.php");
$sql = "select count(*) From s20120501navl;";
if ($sql_result = mysql_query($sql,$survey_connection)){
while ($row = mysql_fetch_row($sql_result)) {
$numberofvisitorstosurvey = $row[0];
}
}
print "$numberofvisitorstosurvey have at least viewed the survey
“;
$sql = “select count(*) from s20120501navl where endtime is not null;”;
if ($sql_result = mysql_query($sql,$survey_connection)){
while ($row = mysql_fetch_row($sql_result)) {
$submittedsurvey = $row[0];
}
}
print “$submittedsurvey have submitted the survey
“;
$sql = “select max(unix_timestamp(endtime ) – unix_timestamp(starttime)) From s20120501navl where endtime is not null;”;
if ($sql_result = mysql_query($sql,$survey_connection)){
while ($row = mysql_fetch_row($sql_result)) {
$longestsurveytime = $row[0];
}
}
print “The longest amount of seconds spent on this survey is $longestsurveytime
“;
$sql = “select min(unix_timestamp(endtime ) – unix_timestamp(starttime)) From s20120501navl where endtime is not null;”;
if ($sql_result = mysql_query($sql,$survey_connection)){
while ($row = mysql_fetch_row($sql_result)) {
$shortestsurveytime = $row[0];
}
}
print “The shortest amount of seconds spent on this survey is $shortestsurveytime
“;
$sql = “select avg(unix_timestamp(endtime ) – unix_timestamp(starttime)) From s20120501navl where endtime is not null;”;
if ($sql_result = mysql_query($sql,$survey_connection)){
while ($row = mysql_fetch_row($sql_result)) {
$averagesurveytime = $row[0];
}
}
print “The average amount of seconds spent on this survey is $averagesurveytime
“;
$sql = “select count(*) from s20120501navl where hour(starttime) >= 0 and hour(starttime)<6 and endtime is not null;";
if ($sql_result = mysql_query($sql,$survey_connection)){
while ($row = mysql_fetch_row($sql_result)) {
$midnighttosixam = $row[0];
}
}
print "$midnighttosixam started the survey between Mid-Night and 6 AM and actually submitted it
“;
$sql = “select count(*) from s20120501navl where hour(starttime) >= 6 and hour(starttime)<12 and endtime is not null;";
if ($sql_result = mysql_query($sql,$survey_connection)){
while ($row = mysql_fetch_row($sql_result)) {
$sixamtonoon = $row[0];
}
}
print "$sixamtonoon started the survey between 6 AM and Noon and actually submitted it
“;
$sql = “select count(*) from s20120501navl where hour(starttime) >= 12 and hour(starttime)<18 and endtime is not null;";
if ($sql_result = mysql_query($sql,$survey_connection)){
while ($row = mysql_fetch_row($sql_result)) {
$noontosixpm = $row[0];
}
}
print "$noontosixpm started the survey between Noon and 6 PM and actually submitted it
“;
$sql = “select count(*) from s20120501navl where hour(starttime) >=18 and hour(starttime)<24 and endtime is not null;";
if ($sql_result = mysql_query($sql,$survey_connection)){
while ($row = mysql_fetch_row($sql_result)) {
$sixpmtomidnight = $row[0];
}
}
print "$sixpmtomidnight started the survey between 6 PM and Mid-Night and actually submitted it
“;
?>
1. |
Will you be selling stocks this May? | ||||||||
|