Skip to content

Commit

Permalink
is this a fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
DariusIII committed Sep 16, 2013
1 parent 720a7c1 commit 37fbadc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/prename.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,15 @@ function preName($argv)
$n = "\n";
echo "Resetting blank searchnames\n";
$bad = $db->query("UPDATE releases SET searchname = name WHERE searchname = ''");
$row = mysqli_fetch_array($bad);
$tot = $row[0];
$tot = $bad->num_rows;
if ($tot > 0)
echo $tot." Releases had no searchname\n";
echo "Getting work\n";
if (isset($argv[1]) && $argv[1]=="full")
$res = $db->query("SELECT ID, name, searchname, groupID, categoryID from releases WHERE relnamestatus IN (0, 1, 7, 20, 21, 22) or categoryID BETWEEN 8000 and 8999");
else
$res = $db->query("SELECT ID, name, searchname, groupID, categoryID FROM releases WHERE relnamestatus IN (0, 1, 7, 20, 21, 22) or categoryID between 8000 and 8999 and adddate > NOW() - INTERVAL 4 HOUR");
$row = mysqli_fetch_array($res);
$total = $row[0];
$total = $res->num_rows;
if ($total > 0)
{
$consoletools = new ConsoleTools();
Expand Down

0 comments on commit 37fbadc

Please sign in to comment.