<?php
$strTableName="My Visit Summary";
$_SESSION["OwnerID"] = $_SESSION["_".$strTableName."_OwnerID"];

$strOriginalTableName="visit_register";

$gstrOrderBy="ORDER BY Date(visit_register.`Date Of Visit`) DESC";
if(strlen($gstrOrderBy) && strtolower(substr($gstrOrderBy,0,8))!="order by")
	$gstrOrderBy="order by ".$gstrOrderBy;

$g_orderindexes=array();
$g_orderindexes[] = array(2, (0 ? "ASC" : "DESC"), "Date(visit_register.`Date Of Visit`)");
$gsqlHead="SELECT `Employee Name`,  Date(visit_register.`Date Of Visit`) AS `Date`,  COUNT(idvisit_register) AS Nos,  Date(Now())-Date(visit_register.`Date Of Visit`) AS comp";
$gsqlFrom="FROM visit_register";
$gsqlWhereExpr="(Date(Now())-Date(visit_register.`Date Of Visit`) <30)";
$gsqlTail="GROUP BY `Employee Name`, Date(visit_register.`Date Of Visit`)";

include(getabspath("include/My_Visit_Summary_settings.php"));

// alias for 'SQLQuery' object
$gQuery = &$queryData_My_Visit_Summary;
$eventObj = &$tableEvents["My Visit Summary"];

$reportCaseSensitiveGroupFields = false;

$gstrSQL = gSQLWhere("");


?>