Query failed: ' . mysql_error()); while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $id = $row['ID']; $title = $row['post_title']; $clean_slug = rawurlencode(bleach($id)); echo "ID:{$row['ID']} " . "post_title : {$title} " . "sanitized : {$clean_slug}
"; $sql_u = "UPDATE `wp_posts` SET post_name = '" . $clean_slug . "' " . 'WHERE ID = ' . $id; echo 'QUERY:' . $sql_u . '
'; mysql_query($sql_u) or die('ERROR: ' . mysql_error()); flush(); } echo "
"; mysql_close($db); ?>