-#!/usr/bin/php4 -q
+#!/usr/bin/php5 -q
<?php
/***************************************************************************
- * Copyright (C) 2003-2006 Polytechnique.org *
+ * Copyright (C) 2003-2008 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
function query ($sql) {
XDB::execute($sql);
- if (mysql_errno() != 0) {
- echo "error in \"$sql\" :\n", mysql_error(),"\n";
+ if (XDB::errno() != 0) {
+ echo "error in \"$sql\" :\n", XDB::error(), "\n";
}
}
-// la table des notifs est nettoyée
+// la table des notifs est nettoyée
$eight_days_ago = date("YmdHis",mktime() - 8*24*60*60);
query("DELETE FROM watch_ops WHERE known<$eight_days_ago");
query("DELETE FROM register_pending WHERE TO_DAYS(NOW()) - TO_DAYS(date) >= 365");
query("delete from register_pending WHERE hash = 'INSCRIT'");
-// quelques tables sont triées pour que la lecture triée soit plus facile
+// quelques tables sont triées pour que la lecture triée soit plus facile
query("alter table applis_def order by text");
query("alter table binets_def order by text");
query("alter table groupesx_def order by text");
query("alter table sections order by text");
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
?>