MySQL returned error "1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND 99 AND page_restrictions !='' AND page_restrictions !='edit (10.0.0.101)"
$start = $db->selectField( 'page', 'MIN(page_id)', false, __FUNCTION__ );
$end = $db->selectField( 'page', 'MAX(page_id)', false, __FUNCTION__ );
+
+ if( !$start ) {
+ die("Nothing to do.\n");
+ }
+
# Do remaining chunk
$end += BATCH_SIZE - 1;
$blockStart = $start;