Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

error after update tables of database

Asked Modified Viewed 1,375 times
L
leGa MC
L
Jebo majku, vamo nikog poznatog

lol
  • Junior Member, joined since
  • Contributed 40 posts on the community forums.
  • Started 17 threads in the forums
  • Started this discussions
asked
Junior Member

i cannot find on this site, but i know that this lately be there...

i was upgrade my php fusion site on v7. and after that I was upgrade my Links tables in database with Custom Page, with this code:

<?php
$changes = 0; $error = 0;
$result = dbquery("SHOW COLUMNS FROM ".$db_prefix."site_links LIKE 'link_parent'");
if (dbrows($result) == 0) {
   $result = dbquery("ALTER TABLE ".$db_prefix."site_links ADD link_parent SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER link_id");
   if ($result) {
      $result = dbquery("INSERT INTO ".$db_prefix."site_links
         (link_parent, link_name, link_url, link_visibility, link_position, link_window, link_order)
         VALUES ('0', 'Home', 'icon_home.gif', '0', '1', '0', '1')"
      );
      $parent = mysql_insert_id();
      $result = dbquery("UPDATE ".$db_prefix."site_links SET link_parent='$parent' WHERE link_id!='$parent'");
      $changes = 1;
   } else {
      echo "<p align='center'><font color='red'><b>ERROR:</b></font> The link_parent column was not added.</p>";
      $error ++;
   }
} else { $changes = 1; }
if ($changes != 0) {
   $result = dbquery("SHOW COLUMNS FROM ".$db_prefix."site_links LIKE 'link_accessibility'");
   if (dbrows($result) == 0) {
      $result = dbquery("ALTER TABLE ".$db_prefix."site_links ADD link_accessibility TINYINT(3) UNSIGNED NOT NULL DEFAULT '0' AFTER link_visibility");
      if ($result) {
         $result = dbquery("UPDATE ".$db_prefix."site_links SET link_accessibility=link_visibility");
      } else {
         echo "<p align='center'><font color='red'><b>ERROR:</b></font> The link_accessibility column was not added.</p>";
         $error ++;
      }
   }
}
$result = dbquery("SHOW COLUMNS FROM ".$db_prefix."site_links LIKE 'link_collapse'");
if (dbrows($result) == 0) {
   $result = dbquery("ALTER TABLE ".$db_prefix."site_links ADD link_collapse TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' AFTER link_accessibility");
   if (!$result) {
      echo "<p align='center'><font color='red'><b>ERROR:</b></font> The link_collapse column was not added.</p>";
      $error ++;
   }
}
if ($error == 0) { echo "<p align='center'>Table alterations are complete.</p>"; }
?>


but now displays error:
Notice: Undefined index: link_accessibility in /home/krizcvan/public_html

so, i need a php code to put in custom page and "downuptade" my upgrade on default PHP Fusion 7. code for links...
0 replies
There are no post found.

Labels

None yet

Statistics

  • Views 0 views
  • Posts 0 posts
  • Votes 0 votes
  • Topic users 1 member

1 participant

L
L
Jebo majku, vamo nikog poznatog

lol
  • Junior Member, joined since
  • Contributed 40 posts on the community forums.
  • Started 17 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet