Exemplo n.º 1
0
function test()
{
    $oper = new Operations();
    $table_name = "my_table";
    $googleFile = "google_sees";
    $userFile = "user_sees";
    // $oper->createTable($table_name);
    // $oper->loadComparisonTask($userFile, $googleFile, $table_name);
    $result = $oper->processing($table_name);
    print var_dump($result);
    $id = $result["id"];
    $label = 'Yes';
    $oper->processed($table_name, $label, $id);
    print $oper->countRows($table_name);
}
Exemplo n.º 2
0
}
// check whether there is more to show
$count = $oper->countRows($table_name);
if ($count == -1) {
    $oper->createTableAndLoadComparisonTask($userFile, $googleFile, $table_name);
    // $oper->createTable($table_name);
    // $oper->loadComparisonTask($userFile, $googleFile, $table_name);
} else {
    if ($count == 0) {
        die("The table has no items");
        // $oper->loadComparisonTask($userFile, $googleFile, $table_name);
        // $result = $oper->processing($table_name);
        // $count = $oper->countRows($table_name);
    } else {
        if ($count > 0) {
            $result = $oper->processing($table_name);
        }
    }
}
echo "Current id: " . $result["id"] . ", Total count: " . $count . "<br>";
echo "Remaining websites: " . $oper->countRows($table_name, "url", "TODO") . ", Total websites: " . $oper->countRows($table_name, "url");
?>

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
<?php 
echo "<title>" . $table_name . "</title>";
?>
</head>