Results 1 to 2 of 2

Thread: Invalid SQL: UPDATE adv_links_categories SET

  1. #1

    Default Invalid SQL: UPDATE adv_links_categories SET

    Hello I have a fresh install of VBA links directory and I'm getting sql errors.


    This error comes up after I edited a link listing.

    Code:
    Database error in vBulletin 3.7.4:
    
    Invalid SQL:
    UPDATE adv_links_categories SET 
    				lastlinkid = '',
    				lastlinktitle = '',
    				lastlinkuserid = '',
    				lastlinkusername = '',
    				lastlinkdateline = ''
    			,
    				lastpostid = '',
    				lastpostlinkid = '',
    				lastpostlinktitle = '',
    				lastpostuserid = '',
    				lastpostusername = '',
    				lastpostdateline = ''
    			 lastlinktitle = 'Washington Pages -- Seattle Business Directory' WHERE catid = 4;
    
    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 'lastlinktitle = 'Washington Pages -- Seattle Business Directory' WHERE catid = 4' at line 14
    Error Number  : 1064
    Request Date  : Friday, November 28th 2008 @ 12:12:28 PM
    Error Date    : Friday, November 28th 2008 @ 12:12:28 PM
    Script        : http://blankmyblank.com/link-directory/addlink.php
    Referrer      : http://blankmyblank.com/link-directory/addlink.php?do=editlink&linkid=2
    IP Address    : Hidden
    Username      : Hidden
    Classname     : vB_Database
    MySQL Version : 4.1.22-standard
    After I go back... it seems fine and waiting for me in the moderation que.


    Thanks!

    - 3lite

  2. #2
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    Default

    Thank you for pointing this out. I've just applied the fix to the forum/includes/vba_links_functions_savelink.php file in the download package here, so if you will update that file on your server with the new version, that should take care of the issue.
    Or if you would rather apply the fix manually, just look in the file for this code:
    PHP Code:
        if ($newlink['name'] != $oldlink['name'])
        {
            
    $upquerynew .= " lastlinktitle = '" $db->escape_string($newlink['name']) . "'";
        } 
    And replace with this:
    PHP Code:
        if ($newlink['name'] != $oldlink['name'] AND $lastlink['linkid'])
        {
            
    $upquerynew .= iif($upquerynew',') . " lastlinktitle = '" $db->escape_string($newlink['name']) . "'";
        } 

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Invalid - invalid URL error?
    By Planet vB in forum Troubleshooting & Problems
    Replies: 4
    Last Post: 11-28-2007, 11:47 AM
  2. Next Update?
    By attroll in forum Feedback & Suggestions
    Replies: 1
    Last Post: 04-25-2007, 10:00 AM
  3. Possible to update to 2.x with vb 3.0.x ?
    By John_44 in forum "How Do I..." Questions
    Replies: 2
    Last Post: 06-24-2006, 09:37 AM
  4. Buy now and update later?
    By jluerken in forum Pre-Sale Questions
    Replies: 3
    Last Post: 07-26-2005, 03:41 PM
  5. Update
    By ConqSoft in forum Site Feedback & Updates
    Replies: 13
    Last Post: 07-22-2005, 08:21 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
  •