I figured it out, but I ballsed my database up.
It changed all the CID to the 1st CID only. I can't figure out why it did that.
PHP Code:
<?php
error_reporting(E_ALL & ~E_NOTICE);
// details removed for security reasons.
$dbase = mysql_connect('*','*','*');
mysql_select_db('*');
//
$cheatdb1 = mysql_query("SELECT * FROM cheatdb",$dbase);
echo "begin database...<br><br>";
$count = 0;
while ($cheatdb = mysql_fetch_array($cheatdb1))
{
$count++;
$url = parse_url($cheatdb['cid']);
parse_str($url['query'], $outcome);
mysql_query("UPDATE cheatdb SET cid='" . $outcome['id'] . "'",$dbase);
}
echo "<br>end database.";
?>