<?php | |
include('wp-config.php'); | |
mysql_connect(DB_HOST, DB_USER, DB_PASSWORD); | |
mysql_select_db(DB_NAME); | |
$results = array(); | |
$n = 0; | |
for($i=1; $i < 500; $i++) | |
{ | |
$q = mysql_query("SELECT `option_value` FROM wp_".$i."_options WHERE option_name = 'permalink_structure'"); | |
if($q) | |
{ | |
$r = mysql_fetch_array($q); | |
if(!isset($results[$r[0]])){ $results[$r[0]] = 0; } | |
$results[$r[0]] = $results[$r[0]] + 1; | |
$n++; | |
} | |
} | |
header('Content-type: text/plain'); | |
print_r($results); | |
echo "\nTotal number of blogs = {$n}"; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment