<?php
set_time_limit(0);
include_once("conn-web/cw.php");
include_once("function.inc.php");
set_include_path(get_include_path() . PATH_SEPARATOR . 'Classes/');
include 'PHPExcel/IOFactory.php';
$schedulesql = "SELECT * FROM [$dbname].[emailpanel].[list_details] WHERE
cast (added_date as date) = cast (GETDATE() as date) ";
$params = array();
$options = array("Scrollable" => SQLSRV_CURSOR_KEYSET);
$schedulestmt = sqlsrv_query($conn, $schedulesql, $params, $options);
if ($schedulestmt === false) {