Esempio n. 1
0
</head>
<body>

    <p>This is a more complete example showing how you can build queries to provide interesting data visualizations.</p>
    <div class="chart-options">
        Show me
        <select id="metric-1" onchange="loadChart();">
            <option value="birth_control">Birth Control Penetration</option>
            <option value="gdp_us">Per-capita GDP</option>
            <option value="savings_rate">Savings Rate</option>
            <option value="investment_rate">Investment Rate</option>
            <option value="infant_mort">Infant Mortality</option>
            <option value="life_expect">Life Expectancy</option>
        </select>
        against
        <select id="metric-2" onchange="loadChart();">
            <option value="gdp_us">Per-capita GDP</option>
            <option value="birth_control">Birth Control Penetration</option>
            <option value="savings_rate">Savings Rate</option>
            <option value="investment_rate">Investment Rate</option>
            <option value="infant_mort">Infant Mortality</option>
            <option value="life_expect">Life Expectancy</option>
        </select>
    </div>
    <div id="chart-div"></div>
    <?php 
writelog2("here");
?>
</body>
</html>
Esempio n. 2
0
<?php

ini_set('include_path', realpath(dirname(__FILE__) . '/../lib/'));
function writelog2($the_string)
{
    $fi = fopen("logfile1.txt", 'a+');
    $the_string = $the_string . "\n";
    fputs($fi, $the_string, strlen($the_string));
    fclose($fi);
}
writelog2(realpath(dirname(__FILE__)));
require_once 'MC/Google/Visualization.php';
$username = '******';
$password = '******';
//$db = new PDO("mysql:host=win-d2sjsg6emdd;dbname=mydb", $username, $password);
$db = new PDO("mysql:host=localhost;dbname=findata", $username, $password);
//$db = new PDO('sqlite:example.db');
writelog2("before new MC_Google_Vis");
$vis = new MC_Google_Visualization($db);
writelog2("in init.php");