First Commit
This commit is contained in:
1 parent
5eb9dd037d
commit
2e62c0e60b
11877 files changed
+2035312
No files matched your search
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
include "db.php";
|
||||
|
||||
$expiry = '2026-12-10';
|
||||
|
||||
$query = "SELECT count(*) FROM schools WHERE province = 'NB' AND status = 'Active' AND expiry_date < '$expiry'";
|
||||
$numActive = db_getVal($query);
|
||||
|
||||
$query = "SELECT count(*) FROM schools WHERE province = 'NB' AND status = 'Special' AND expiry_date < '$expiry'";
|
||||
$numSpecial = db_getVal($query);
|
||||
|
||||
echo("$numActive Active Schools\n");
|
||||
echo("$numSpecial Special Schools\n");
|
||||
$x = readline("Update? ");
|
||||
|
||||
$query = "UPDATE schools SET expiry_date = '$expiry' WHERE province = 'NB' AND status IN ('Active','Special') AND expiry_date < '$expiry'";
|
||||
db_query($query);
|
||||
|
||||
?>
|
||||
Reference in new issue
Block a user