First Commit
This commit is contained in:
1 parent
5eb9dd037d
commit
2e62c0e60b
11877 files changed
+2035312
No files matched your search
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
include "db.php";
|
||||
|
||||
$school_num = 19058;
|
||||
$students = array();
|
||||
|
||||
db_query("USE hotlunch_20161013");
|
||||
|
||||
$query = "SELECT p.*,u.first_name AS parent_first_name,u.last_name AS parent_last_name " .
|
||||
"FROM people AS p, users AS u " .
|
||||
"WHERE p.school_num = $school_num " .
|
||||
"AND u.school_num = $school_num " .
|
||||
"AND people_type = 'Student' " .
|
||||
"AND p.user_num = u.record_num " .
|
||||
"ORDER BY last_name, first_name";
|
||||
$results = db_query($query);
|
||||
|
||||
while ($row = db_fetch_assoc($results)) {
|
||||
$students[] = $row;
|
||||
}
|
||||
|
||||
|
||||
db_query("USE hotlunch");
|
||||
|
||||
for ($i = 0; $i < count($students); $i++) {
|
||||
$row = $students[$i];
|
||||
extract($row);
|
||||
|
||||
$query = "SELECT p.*,u.first_name AS parent_first_name,u.last_name AS parent_last_name " .
|
||||
"FROM people AS p, users AS u " .
|
||||
"WHERE p.school_num = $school_num " .
|
||||
"AND u.school_num = $school_num " .
|
||||
"AND people_type = 'Student' " .
|
||||
"AND p.user_num = u.record_num " .
|
||||
"AND p.record_num = $record_num";
|
||||
$results = db_query($query);
|
||||
$row = db_fetch_assoc($results);
|
||||
if ($row['user_num'] != $user_num) {
|
||||
echo("$record_num: $first_name $last_name - $parent_first_name $parent_last_name ($user_num)\n");
|
||||
extract($row);
|
||||
echo("$record_num: $first_name $last_name - $parent_first_name $parent_last_name ($user_num)\n");
|
||||
echo("\n");
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in new issue
Block a user