<?php
require('./wp-blog-header.php');

$start '100';
$end '101';

for (
$i=$start$i<=$end$i++){
    
$result $wpdb->query("INSERT wp_post2cat VALUES (NULL, $i, 1)");
    if(
$result == 1) {
        
$count++;
    }
}
echo 
"$count rows affected.";
?>