HI guys, im new here.
I need a help in this problem.
I trying to connect with SQL Server but i receveid this return message:
Fatal error: Class 'SQLSVRPivotDataSource' not found in C:\Program Files (x86)\NetMake\v81\wwwroot\KoolPHPSuite\Examples\KoolPivotTable\Firstlook\Firstlook\teste.php on line 42
Am i mading a mistake ?
My font code:
*******************************************
<?php
/*
* This file is ready to run as standalone example. However, please do:
* 1. Add tags <html><head><body> to make a complete page
* 2. Change relative path in $KoolControlFolder variable to correctly point to KoolControls folder
*/
$KoolControlsFolder = "../../../../KoolControls";//Relative path to "KoolPHPSuite/KoolControls" folder
require $KoolControlsFolder."/KoolAjax/koolajax.php";
$koolajax->scriptFolder = $KoolControlsFolder."/KoolAjax";
require $KoolControlsFolder."/KoolPivotTable/koolpivottable.php";
if(isset($_POST["style_select"]))
{
$_SESSION["style_select"] = $_POST["style_select"];
}
else
{
if (!$koolajax->isCallback)
{
//Page Init: show default style
$_SESSION["style_select"] = "office2007";
}
}
$dbhost = "win-oloebbm0t2n\intelliti"; #Nome do host
$db = "IOCP"; #Nome do banco de dados
$user = "sa"; #Nome do usuário
$password = "INTELLITI"; #Senha do usuário
// Dados da tabela
$tabela = "nometabela"; #Nome da tabela
$campo1 = "campo1tabela"; #Nome do campo da tabela
$campo2 = "campo2tabela"; #Nome de outro campo da tabela
$conninfo = array("Database" => $db, "UID" => $user, "PWD" => $password);
$dbcon = sqlsrv_connect($dbhost, $conninfo);
/*$dbcon = sqlsvr_connect('win-oloebbm0t2n\intelliti', array( 'Database'=>'IOCP', 'UID'=>'sa', 'PWD'=>'INTELLITI'));*/
$ds = new SQLSVRPivotDataSource($dbcon);//This $db_con link has been created inside KoolPHPSuite/Resources/runexample.php
$ds ->select("CANAL, NEM01, NEM02, NEM03 , PRECO_VENDA, PRECO_CUSTO")
->from("dbo.DM_ESTRUTURA_MERCADOLOGICA");
$pivot = new KoolPivotTable("pivot");
$pivot->scriptFolder = $KoolControlsFolder."/KoolPivotTable";
$pivot->styleFolder = $_SESSION["style_select"];
$pivot->DataSource = $ds;
//Turn on ajax features.
$pivot->AjaxEnabled = true;
...
******************************************