You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
572 B
PHP
35 lines
572 B
PHP
<?php
|
|
require("include.php");
|
|
|
|
$found = array();
|
|
|
|
$query = "SELECT BookId FROM files GROUP BY `BookId` ORDER BY `BookId` DESC LIMIT 1";
|
|
$result = mysql_query_cached($query, 1);
|
|
$max = $result->data[0]['BookId'];
|
|
print_r($max . " total\n");
|
|
|
|
$query = "SELECT BookId FROM files GROUP BY `BookId`";
|
|
$result = mysql_query_cached($query, 1);
|
|
|
|
foreach($result->data as $row)
|
|
{
|
|
$found[$row['BookId']] = true;
|
|
}
|
|
|
|
for($i = 1; $i <= $max; $i++)
|
|
{
|
|
if(!isset($found[$i]))
|
|
{
|
|
echo("{$i} missing!\n");
|
|
}
|
|
else
|
|
{
|
|
//echo("{$i} isset.");
|
|
}
|
|
}
|
|
|
|
echo("derp");
|
|
|
|
//print_r($found);
|
|
?>
|