priority.php 517 B

12345678910111213141516171819
  1. #!/usr/local/bin/php
  2. <?php
  3. # Includes
  4. require_once 'opendrive.php';
  5. # Open the DB connection
  6. $dbh = dbOpen();
  7. # Prepare statements
  8. $update = $dbh->prepare('UPDATE files SET priority = :priority WHERE path LIKE :path');
  9. # Set several groups
  10. $update->execute(array(':priority' => 100, ':path' => 'Movies/%'));
  11. $update->execute(array(':priority' => 50, ':path' => 'iTunes/%'));
  12. $update->execute(array(':priority' => -50, ':path' => 'Backups/%'));
  13. $update->execute(array(':priority' => -100, ':path' => 'TV/%'));
  14. ?>