Exemplo n.º 1
0
    echo '<tr><th>' . $row['callSum'] . '</th><th>' . $row['Calls'] . '</th>';
}
// Run the query
$result = $db->sql_query(getTotalSQL(2015));
$row = $db->sql_fetchrow($result);
echo '<tr><th>Total</th><th>' . $row['Total'] . '</th>';
echo '</table>';
?>
                        </details>
                        <br>
                        <details open='true' id="custom-marker" class="wccca-details">
                            <summary>2014 Table</summary>
                            <?php 
echo '<table style="width:100%;">';
echo '<tr><th>Event</th><th>Total</th></tr>';
$result = $db->sql_query(getTableSQL(2014));
while ($row = $result->fetch_assoc()) {
    echo '<tr><th>' . $row['callSum'] . '</th><th>' . $row['Calls'] . '</th>';
}
// Run the query
$result = $db->sql_query(getTotalSQL(2014));
$row = $db->sql_fetchrow($result);
echo '<tr><th>Total</th><th>' . $row['Total'] . '</th>';
echo '</table>';
?>
                        </details>

                        <?php 
$begin = strtotime('2015-07-4 00:01:00');
$now = time();
$end = strtotime('2015-07-5 02:00:00');
Exemplo n.º 2
0
     $tbl = split("\\.", $lstParams['table']);
     $meta = getTableSQL($db, $tbl[1] . "." . $tbl[2]);
     $sql = "";
     foreach ($meta as $key => $value) {
         if ($value != '') {
             $sql .= $value . "\\n";
         }
     }
     // -- process edit
     print "document.getElementById('sql').value = \"" . $sql . "\";";
     print "top.elements['tableScript'].dataReceived();";
     break;
 case "tableScript::get_data":
     // -- table structure
     $tbl = split("\\.", $lstParams['table']);
     $meta = getTableSQL($db, $tbl[1] . "." . $tbl[2]);
     $sqll = "";
     foreach ($meta as $key => $value) {
         if ($value != '') {
             $sqll .= $value . "\\n";
         }
     }
     // -- get data
     $sql = "SELECT * FROM " . $tbl[1] . "." . $tbl[2];
     $rs = $db->execute($sql);
     $data = "";
     while ($rs && !$rs->EOF) {
         $fields = "";
         for ($i = 0; $i < $rs->fieldCount; $i++) {
             if ($fields != '') {
                 $fields .= ",";