Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Blog db access errors

  1. #1
    Toreador's Avatar
    Join Date
    Aug 2006
    Posts
    301

    Default Blog db access errors

    When on the site, and you go to view a blog, you get the classic redbox db access error. In the admin backend I get the same when I try and post moderate blogs. I just upgraded from 5.3, followed everything to a "t" and had no issues. Help?
    Dolphin 5.6 ...I think

  2. #2
    Toreador's Avatar
    Join Date
    Aug 2006
    Posts
    301

    Default

    Here are the error logs emailed from this.



    Error in /blog.php: Unknown column 'Blog.categoryID' in 'on clause'
    Query: '
    SELECT
    DISTINCT `BlogCategories`.`categoryID` AS catID,
    `BlogCategories`.`ownerId`,
    `BlogCategories`.`categoryName`,
    `BlogCategories`.`categoryDesc`,
    `BlogCategories`.`categoryPhoto`,
    `Blog`.`blogID` AS blogID,
    `Blog`.`blogCaption`,
    `Blog`.`blogText`,
    `Blog`.`blogDate`,
    `Blog`.`blogReadPermission`,
    `Blog`.`blogCommentPermission`,
    `Blog`.`blogStatus`,
    `Blog`.`blogPhoto`,
    `Profiles`.`ID` AS profID,
    `Profiles`.`NickName`
    FROM
    `BlogCategories`
    LEFT JOIN `Blog` ON `Blog`.`categoryID` = `BlogCategories`.`categoryID`
    INNER JOIN `Profiles` ON `BlogCategories`.ownerId = `Profiles`.`ID`
    WHERE
    `BlogCategories`.`ownerId` = '2'

    GROUP BY `BlogCategories`.`categoryID`

    ;
    '



    ____________________________

    Error in /admin/post_mod_blog.php: Unknown column 'Blog.categoryID' in 'on clause'
    Query: '
    SELECT
    `Blog`.`blogID`,
    `Blog`.`blogCaption`,
    `Blog`.`blogText`,
    `Blog`.`blogDate`,
    `Blog`.`blogPhoto`,
    `Profiles`.`ID`,
    `Profiles`.`NickName`
    FROM `Blog`

    INNER JOIN `BlogCategories` ON `Blog`.`categoryID` = `BlogCategories`.`categoryID`
    INNER JOIN `Profiles` ON `BlogCategories`.`ownerID` = `Profiles`.`ID`
    WHERE `blogStatus` = 'disapproval'


    LIMIT 0, 10
    ;
    '
    Dolphin 5.6 ...I think

  3. #3
    Toreador's Avatar
    Join Date
    Aug 2006
    Posts
    301

    Default

    Answer found:


    If you get a red-box message "Database access error" when trying to view the Blog section in admin or user panels (after

    applying upgrade pack from 5.3 to 5.4),

    then you need to do these actions:

    1) go to your Dolphin admin panel -> manage database section, choose "Backup structure and content" and and press "Save" button.

    2) go to your phpMyAdmin panel and choose your Dolphin's database.

    3) press "SQL" command window and there run this query:

    ALTER TABLE `Blog` ADD `categoryID` int(11) default NULL after `blogID`;

    4) Check the blog pages again to make sure it worked.
    Dolphin 5.6 ...I think

  4. #4
    taskmaster
    Guest

    Default

    hmm just tried that, but i get this:

    Error

    SQL-query :

    ALTER TABLE `Blog` ADD `categoryID` int( 11 ) default NULL AFTER `blogID`

    MySQL said:


    #1060 - Duplicate column name 'categoryID'


    I will also say Im no big programmer, more a webmaster and seo

  5. #5
    taskmaster
    Guest

    Default

    hmm no reply to this

  6. #6
    mark
    Guest

    Question

    Quote Originally Posted by taskmaster
    hmm just tried that, but i get this:

    Error

    SQL-query :

    ALTER TABLE `Blog` ADD `categoryID` int( 11 ) default NULL AFTER `blogID`

    MySQL said:


    #1060 - Duplicate column name 'categoryID'


    I will also say Im no big programmer, more a webmaster and seo

    What is the error logs emailed to you after you get a red-box message "Database access error" ? Maybe you have different case.

  7. #7
    taskmaster
    Guest

    Default

    damn that was a quick reply.

    Error in /blog.php: You have an error in your SQL syntax near ';
    ' at line 27
    Query: '
    SELECT
    DISTINCT `BlogCategories`.`categoryID` AS catID,
    `BlogCategories`.`ownerId`,
    `BlogCategories`.`categoryName`,
    `BlogCategories`.`categoryDesc`,
    `BlogCategories`.`categoryPhoto`,
    `Blog`.`blogID` AS blogID,
    `Blog`.`blogCaption`,
    `Blog`.`blogText`,
    DATE_FORMAT(`Blog`.`blogDate`, '%m-%d-%y %H:%i') AS blogDate,
    `Blog`.`blogReadPermission`,
    `Blog`.`blogCommentPermission`,
    `Blog`.`blogStatus`,
    `Blog`.`blogPhoto`,
    `Profiles`.`ID` AS profID,
    `Profiles`.`NickName`
    FROM
    `BlogCategories`
    LEFT JOIN `Blog` ON `Blog`.`categoryID` = `BlogCategories`.`categoryID`
    INNER JOIN `Profiles` ON `BlogCategories`.ownerId = `Profiles`.`ID`
    WHERE
    `BlogCategories`.`ownerId` = '5'

    GROUP BY `BlogCategories`.`categoryID`

    ;
    '

  8. #8
    mark
    Guest

    Question

    I think your case is different not the upgrade bug.

    Quote Originally Posted by taskmaster
    damn that was a quick reply.

    Error in /blog.php: You have an error in your SQL syntax near ';
    ' at line 27
    Query: '
    SELECT
    DISTINCT `BlogCategories`.`categoryID` AS catID,
    `BlogCategories`.`ownerId`,
    `BlogCategories`.`categoryName`,
    `BlogCategories`.`categoryDesc`,
    `BlogCategories`.`categoryPhoto`,
    `Blog`.`blogID` AS blogID,
    `Blog`.`blogCaption`,
    `Blog`.`blogText`,
    DATE_FORMAT(`Blog`.`blogDate`, '%m-%d-%y %H:%i') AS blogDate,
    `Blog`.`blogReadPermission`,
    `Blog`.`blogCommentPermission`,
    `Blog`.`blogStatus`,
    `Blog`.`blogPhoto`,
    `Profiles`.`ID` AS profID,
    `Profiles`.`NickName`
    FROM
    `BlogCategories`
    LEFT JOIN `Blog` ON `Blog`.`categoryID` = `BlogCategories`.`categoryID`
    INNER JOIN `Profiles` ON `BlogCategories`.ownerId = `Profiles`.`ID`
    WHERE
    `BlogCategories`.`ownerId` = '5'

    GROUP BY `BlogCategories`.`categoryID`

    ;
    '


    Hmmm im not sure why you have the ' (single quote) and the bottom of the error message is this part of the emailed log error?

    GROUP BY `BlogCategories`.`categoryID`

    ;
    '

  9. #9
    taskmaster
    Guest

    Default

    yes

    GROUP BY `BlogCategories`.`categoryID`

    ;
    '

    is in the email, my installation is a pure v5.5 no upgrade.

  10. #10
    mark
    Guest

    Thumbs up

    I think we need to do it the hardway

    IN inc/db.inc.php, IN function db_res and db_arr

    look for this line :
    echo PrintErr( 'Database access error' );
    Add this line :
    echo "<br>SQL ERROR : ".mysql_error()." QUERY : ".$query;
    This will show brief information of the error.

    Quote Originally Posted by taskmaster
    yes

    GROUP BY `BlogCategories`.`categoryID`

    ;
    '

    is in the email, my installation is a pure v5.5 no upgrade.

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. PHP errors or something...
    By Stanjensen in forum General Troubleshooting
    Replies: 1
    Last Post: 10-04-2008, 11:45 PM
  2. Blog & Blog Post Editing/Deleting Not Happening
    By codejungle in forum Dolphin General Discussion v6.00 and above
    Replies: 1
    Last Post: 09-09-2008, 01:47 PM
  3. Getting errors
    By silverado350 in forum Dolphin General Discussion v6.00 and above
    Replies: 1
    Last Post: 08-28-2008, 03:03 AM
  4. Done, but with errors
    By skyhawk85u in forum General Issues, Comments, Questions
    Replies: 12
    Last Post: 05-29-2007, 08:12 PM
  5. errors in log
    By lordhagar in forum General Troubleshooting
    Replies: 2
    Last Post: 05-04-2006, 02:39 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •