Results 1 to 4 of 4

Site map error codes

This is a discussion on Site map error codes within the General Discussion forums, part of the vBSEO Google/Yahoo Sitemap category; I have tried two add on site map generators and they both throw up this error code Warning : Division ...

  1. #1
    Senior Member Lee G's Avatar
    Real Name
    Lee
    Join Date
    Sep 2006
    Location
    Costa Blanca
    Posts
    683
    Liked
    40 times
    Blog Entries
    4

    Site map error codes

    I have tried two add on site map generators and they both throw up this error code

    Warning: Division by zero in /home/thespain/public_html/vbseo_sitemap/vbseo_sitemap_functions.php on line 172
    The two generators are the one by code monkey on here
    And this one from

    PHP Code:
    <?
    vbSEO Google Sitemap Generator - vbclassified Add On.
    # Written by Mike Weinand (http://www.thebubbler.com)

    # Full HTTP path to your gallery root (including trailing forwardslash)
    $classified_url 'http://www.thespainforum.com/vbclassified.php';

    # Priority you want to assign to the sitemap pages
    $category_priority 0.8;
    $ad_priority 0.5;

    # How often you wish to flag for updates
    $category_update 'daily';
    $ad_update 'weekly';

    # Tables
    $categories_table 'vb_vbclassified_category';
    $ads_table 'vb_vbclassified';


    # DON'T EDIT PAST HERE #############################################

    vbseo_add_url(
        
    $classified_url0.9gmdate("Y-m-d"), 'daily'
    );

    $categories $db->query_read('SELECT categoryid FROM ' $categories_table ' WHERE display > 0');
    while (
    $category $db->fetch_array($categories))
    {
            
    $modified gmdate("Y-m-d");
            
    vbseo_add_url(
                
    $classified_url '?do=category&amp;categoryid='.$category['categoryid'],
               
    $category_priority$modified$category_update
            
    );
    }

    $ads $db->query_read('SELECT classifiedid, dateline FROM ' $ads_table ' WHERE active = 1 ');
    while (
    $ad $db->fetch_array($ads))
    {
            
    $modified gmdate("Y-m-d"$ad['dateline']);
            
    vbseo_add_url(
                
    $classified_url '?do=ad&amp;id='.$ad['classifiedid'],
               
    $ad_priority$modified$ad_update
            
    );
    }
    ?>
    Is there or are there any obvious mistakes in their set up that can be easily rectified?

  2. #2
    Senior Member Lee G's Avatar
    Real Name
    Lee
    Join Date
    Sep 2006
    Location
    Costa Blanca
    Posts
    683
    Liked
    40 times
    Blog Entries
    4
    I have tried redoing the above and seem to be making progress but, I'm still stuck

    PHP Code:
    <?
    vbSEO Google Sitemap Generator - vbclassified Add On.
    # Written by Mike Weinand (http://www.thebubbler.com)
    # Full HTTP path to your gallery root (including trailing forwardslash)
    $classified_url 'http://www.thespainforum.com/vbclassified.php';
    # Priority you want to assign to the sitemap pages
    $category_priority 0.8;
    $ad_priority 0.5;
    # How often you wish to flag for updates
    $category_update 'daily';
    $ad_update 'weekly';
    # Tables
    $categories_table 'vbclassified_category';
    $ads_table 'vbclassified';

    # DON'T EDIT PAST HERE #############################################
    vbseo_add_url(
        
    $classified_url0.9gmdate("Y-m-d"), 'daily'
    );
    $categories $db->query_read('SELECT categoryid FROM ' $categories_table 'WHERE display > 0');
    while (
    $category $db->fetch_array($categories))
    {
            
    $modified gmdate("Y-m-d");
            
    vbseo_add_url(
                
    $classified_url '?do=category&amp;categoryid='.$category['categoryid'],
               
    $category_priority$modified$category_update
            
    );
    }
    $ads $db->query_read('SELECT classifiedid, dateline FROM ' $ads_table ' WHERE active = 1 ');
    while (
    $ad $db->fetch_array($ads))
    {
            
    $modified gmdate("Y-m-d"$ad['dateline']);
            
    vbseo_add_url(
                
    $classified_url '?do=ad&amp;id='.$ad['classifiedid'],
               
    $ad_priority$modified$ad_update
            
    );
    }
    ?>
    I have corrected the databases to the right ones, but this is the error Im getting sent in the email

    Database error in vBulletin 3.6.8:

    Invalid SQL:
    SELECT categoryid FROM vbclassified_categoryWHERE display > 0;

    MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '> 0' at line 1
    Can anyone help me please

  3. #3
    Senior Member
    Real Name
    Keith Cohen
    Join Date
    Jul 2005
    Location
    Raleigh, NC USA
    Posts
    6,147
    Liked
    12 times
    You need a space before WHERE

  4. #4
    Senior Member Lee G's Avatar
    Real Name
    Lee
    Join Date
    Sep 2006
    Location
    Costa Blanca
    Posts
    683
    Liked
    40 times
    Blog Entries
    4
    Cheers for that Keith, I never noticed your reply when I posted this

    To late done and sorted. There was a syntax on one line which was causing the final error.

    Final code for vbclassifieds site map generator is

    PHP Code:
    <?
    vbSEO Google Sitemap Generator - vbclassified Add On.
    # Written by Mike Weinand (http://www.thebubbler.com)
    # Updated by Lee G (http://www.thespainforum.com) 
    # Full HTTP path to your gallery root (including trailing forwardslash)
    $classified_url 'http://www.#####your url here######.com/vbclassified.php';
    # Priority you want to assign to the sitemap pages
    $category_priority 0.8;
    $ad_priority 0.5;
    # How often you wish to flag for updates
    $category_update 'daily';
    $ad_update 'weekly';
    # Tables
    $categories_table 'vbclassified_category';
    $ads_table 'vbclassified';
     
    # DON'T EDIT PAST HERE #############################################
    vbseo_add_url(
        
    $classified_url0.9gmdate("Y-m-d"), 'daily'
    );
    $categories $db->query_read('SELECT categoryid FROM ' $categories_table ' WHERE display > 0 ');
    while (
    $category $db->fetch_array($categories))
    {
            
    $modified gmdate("Y-m-d");
            
    vbseo_add_url(
                
    $classified_url '?do=category&amp;categoryid='.$category['categoryid'],
               
    $category_priority$modified$category_update
            
    );
    }
    $ads $db->query_read('SELECT classifiedid, dateline FROM ' $ads_table ' WHERE active = 1 ');
    while (
    $ad $db->fetch_array($ads))
    {
            
    $modified gmdate("Y-m-d"$ad['dateline']);
            
    vbseo_add_url(
                
    $classified_url '?do=ad&amp;id='.$ad['classifiedid'],
               
    $ad_priority$modified$ad_update
            
    );
    }
    ?>
    If anyone uses it, you have to alter this line
    PHP Code:
    # Full HTTP path to your gallery root (including trailing forwardslash)
    $classified_url 'http://www.#####your url here######.com/vbclassified.php'
    Since the new site map generator has come out today, the site map generator on here some where also works
    Last edited by Lee G; 11-21-2007 at 04:19 PM. Reason: Apologising to Keith

Similar Threads

  1. The vBSEO LinkBacks User Guide - vBSEO 3.0 GOLD
    By Joe Ward in forum General Discussion
    Replies: 49
    Last Post: 09-20-2011, 08:10 PM

Posting Permissions

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