$results1=mysql_query("INSERT INTO ".$pv."config (name, value, comment, kind, options, title, category, cat_order) VALUES ('catcase','0','Change Category Case For Your New Categories','list','0|Exact^1|ALL UPPER CASE^2|all lower case','Category Text Case','02|Categories','2')", $connection) or die(mysql_error());
$results2=mysql_query("INSERT INTO ".$pv."config (name, value, comment, kind, options, title, category, cat_order) VALUES ('showpagerankgoogle','1','Show Google Page Rank, below URL','flag','','Search Engine Information - Google Page Rank','03|Links','10')", $connection) or die(mysql_error());
$query ="UPDATE ".$pv."config SET value = '3.31' WHERE name = 'recipman_version'";
$query ="UPDATE ".$pv."config SET cat_order = '3' WHERE name = 'catfilesep'";
$query ="UPDATE ".$pv."config SET cat_order = '4' WHERE name = 'showcounters'";
$query ="UPDATE ".$pv."config SET cat_order = '5' WHERE name = 'dispsubcat'";
$query ="UPDATE ".$pv."config SET cat_order = '6' WHERE name = 'showcatdesc'";
$query ="UPDATE ".$pv."config SET comment = 'Show Alexa Traffic Rank, below URL, below URL', title = 'Search Engine Information - Alexa Traffic Rank', cat_order = '9' WHERE name = 'showpagerank'";
$query ="UPDATE ".$pv."config SET cat_order = '11' WHERE name = 'showrecip'";
$query ="UPDATE ".$pv."config SET cat_order = '12' WHERE name = 'linkstatus'";
$query ="UPDATE ".$pv."config SET cat_order = '13' WHERE name = 'showlinktotal'";
$query ="UPDATE ".$pv."config SET cat_order = '14' WHERE name = 'displinktotal'";
$results3 = mysql_query($query,$connection) or die(mysql_error()."<br />QUERY: $query");
if(mysql_affected_rows() == 0)
{
$query2 = "SELECT * FROM ".$pv."config WHERE name = 'recipman_version'";
$result2 = mysql_query($query2) or die(mysql_error()."<br />QUERY: $query2");
if(mysql_num_rows($result2) == 0)
{
trigger_error("ERROR: no matches in ".$pv."config for name = 'recipman_version'", E_USER_WARNING);
}
else
{
trigger_error("ERROR: no rows updated for unknown reason in table ".$pv."config", E_USER_WARNING);
}
}
mysql_close($connection);
echo "<BR><BR>";
if ($results1 != "1") {
echo "Could Not Instert New Row - Google Page Rank<BR><BR>";
} else {
echo "Updated: Insterted New - Google Page Rank<BR><BR>";
}
if ($results2 != "1") {
echo "Could Not Instert New Row - Category Case Change<BR><BR>";
} else {
echo "Updated: Insterted New Row - Category Case Change<BR><BR>";
}
if ($results3 != "1") {
echo "Could Not Update Existing Rows<BR><BR>";
} else {
echo "Updated Existing Rows<BR><BR>";
}
echo "<BR><BR>";
echo "<font size=\"4\">Upgrade Completed!</font><BR><BR><font color=\"#FF0000\" size=\"-1\">Now Delete The Upgrade-SQL Folder</font>";
?>
and the error i get is:
Warning: ERROR: no rows updated for unknown reason in table rl_config in /home/xpixalc/public_html/rm/Upgrade-SQL/upgrade-330to331.php on line 129
$results1=mysql_query("INSERT INTO ".$pv."config (name, value, comment, kind, options, title, category, cat_order) VALUES ('catcase','0','Change Category Case For Your New Categories','list','0|Exact^1|ALL UPPER CASE^2|all lower case','Category Text Case','02|Categories','2')", $connection) or die(mysql_error());
$results2=mysql_query("INSERT INTO ".$pv."config (name, value, comment, kind, options, title, category, cat_order) VALUES ('showpagerankgoogle','1','Show Google Page Rank, below URL','flag','','Search Engine Information - Google Page Rank','03|Links','10')", $connection) or die(mysql_error());
$sql ="UPDATE ".$pv."config SET value = '3.31' WHERE name = 'recipman_version'";
$results3 = @mysql_query($sql,$connection) or die(mysql_error());
$sqla ="UPDATE ".$pv."config SET cat_order = '3' WHERE name = 'catfilesep'";
$results3a = @mysql_query($sqla,$connection) or die(mysql_error());
$sqls ="UPDATE ".$pv."config SET cat_order = '4' WHERE name = 'showcounters'";
$results3s = @mysql_query($sqls,$connection) or die(mysql_error());
$sqld ="UPDATE ".$pv."config SET cat_order = '5' WHERE name = 'dispsubcat'";
$results3d = @mysql_query($sqld,$connection) or die(mysql_error());
$sqlw ="UPDATE ".$pv."config SET cat_order = '6' WHERE name = 'showcatdesc'";
$results3w = @mysql_query($sqlw,$connection) or die(mysql_error());
$sqlr ="UPDATE ".$pv."config SET comment = 'Show Alexa Traffic Rank, below URL, below URL', title = 'Search Engine Information - Alexa Traffic Rank', cat_order = '9' WHERE name = 'showpagerank'";
$results3r = @mysql_query($sqlr,$connection) or die(mysql_error());
$sqlg ="UPDATE ".$pv."config SET cat_order = '11' WHERE name = 'showrecip'";
$results3g = @mysql_query($sqlg,$connection) or die(mysql_error());
$sqll ="UPDATE ".$pv."config SET cat_order = '12' WHERE name = 'linkstatus'";
$results3l = @mysql_query($sqll,$connection) or die(mysql_error());
$sqlp ="UPDATE ".$pv."config SET cat_order = '13' WHERE name = 'showlinktotal'";
$results3p = @mysql_query($sqlp,$connection) or die(mysql_error());
$sqlo ="UPDATE ".$pv."config SET cat_order = '14' WHERE name = 'displinktotal'";
$results3o = @mysql_query($sqlo,$connection) or die(mysql_error());
mysql_close($connection);
echo "<BR><BR>";
if ($results1 != "1") {
echo "Could Not Instert New Row - Google Page Rank<BR><BR>";
} else {
echo "Updated: Insterted New - Google Page Rank<BR><BR>";
}
if ($results2 != "1") {
echo "Could Not Instert New Row - Category Case Change<BR><BR>";
} else {
echo "Updated: Insterted New Row - Category Case Change<BR><BR>";
}
if ($results3 != "1") {
echo "Could Not Add New Rows<BR><BR>";
} else {
echo "Added New Rows<BR><BR>";
}
echo "<BR><BR>";
echo "<font size=\"4\">Upgrade Completed!</font><BR><BR><font color=\"#FF0000\" size=\"-1\">Now Delete The Upgrade-SQL Folder</font>";
Bookmarks