Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    New Pligger Armantas's Avatar
    Joined
    Sep 2007
    Posts
    6

    [SOLVED] SQL syntax error

    Hello, i`m not good at english but i will try to explain my problem.
    When i trying to submit new story on step 3 i get this error:


    How can i fix it?

    Sincerily,
    Armantas

  2. #2
    Pligg Donor AnAlienHolakres3's Avatar
    Joined
    Jul 2007
    Posts
    116
    I suppose you did some customization didnt you? If yes, backup your customized file and repalce with the original, then refresh page and see effect. I usually got this error when link_id was 0 or empty string.

    If you didnt make any changes with original pligg check links table,check auto_increment value etc. If anything is ok...then....I dont know

  3. #3
    New Pligger Armantas's Avatar
    Joined
    Sep 2007
    Posts
    6
    I didnt make any changes. I installed pligg 9.7, login and try to submit news but i get this syntax error :/

  4. #4
    Mayor of PliggVille AshDigg's Avatar
    Joined
    Dec 2005
    Posts
    1,515
    Please provide us with more information so we can help you.

    Are you (or your webhost) using Linux or Windows for the server.
    What PHP / MySQL versions are you using?

  5. #5
    New Pligger Armantas's Avatar
    Joined
    Sep 2007
    Posts
    6
    This is my host information:

    OS: Linux Debian 4.0 (Etch)
    PHP: 5.2.0
    MySQL: 5.0.45

  6. #6
    Mayor of PliggVille AshDigg's Avatar
    Joined
    Dec 2005
    Posts
    1,515
    in /libs/links.php look around line 150 for

    PHP Code:
    $db->query("UPDATE " table_links " set link_summary='$link_summary', link_title_url='$link_title_url', link_url='$link_url', link_url_title='$link_url_title', link_title='$link_title', link_content='$link_content', link_tags='$link_tags', link_field1='$link_field1', link_field2='$link_field2', link_field3='$link_field3', link_field4='$link_field4', link_field5='$link_field5', link_field6='$link_field6', link_field7='$link_field7', link_field8='$link_field8', link_field9='$link_field9', link_field10='$link_field10', link_field11='$link_field11', link_field12='$link_field12', link_field13='$link_field13', link_field14='$link_field14', link_field15='$link_field15' WHERE link_id=$this->id"); 
    replace with

    PHP Code:
    $sql "UPDATE " table_links " set link_summary='$link_summary', link_title_url='$link_title_url', link_url='$link_url', link_url_title='$link_url_title', link_title='$link_title', link_content='$link_content', link_tags='$link_tags', link_field1='$link_field1', link_field2='$link_field2', link_field3='$link_field3', link_field4='$link_field4', link_field5='$link_field5', link_field6='$link_field6', link_field7='$link_field7', link_field8='$link_field8', link_field9='$link_field9', link_field10='$link_field10', link_field11='$link_field11', link_field12='$link_field12', link_field13='$link_field13', link_field14='$link_field14', link_field15='$link_field15' WHERE link_id=$this->id";
    echo 
    $sql;
    $db->query($sql); 
    When you get to step 3, you'll see the MySQL statement. Copy and paste that for us to see.

    thanks

  7. #7
    New Pligger Armantas's Avatar
    Joined
    Sep 2007
    Posts
    6
    This is what i get:

  8. #8
    Mayor of PliggVille AshDigg's Avatar
    Joined
    Dec 2005
    Posts
    1,515
    I'm sorry, that was the wrong query!

    Around line 178 - 179 you'll see this...

    PHP Code:
                $sql "UPDATE " table_links " set `link_reports`=$link_reports, `link_comments`=$link_comments, link_author=$link_author, link_status='$link_status', link_randkey=$link_randkey, link_category=$link_category, link_modified=NULL, link_date=FROM_UNIXTIME($link_date), link_published_date=FROM_UNIXTIME($link_published_date), link_votes=$link_votes, link_karma=$link_karma WHERE link_id=$this->id";
                
    $db->query($sql); 
    just put a

    PHP Code:
    echo $sql
    in between those two lines and paste the results.

    thanks!

  9. #9
    New Pligger Armantas's Avatar
    Joined
    Sep 2007
    Posts
    6
    Result:


  10. #10
    Mayor of PliggVille AshDigg's Avatar
    Joined
    Dec 2005
    Posts
    1,515
    Thanks.

    Try replacing your /libs/link.php file with this one. If it doesn't work, change line 54 to 'true' and post the results.

    thanks

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 2
    Last Post: 04-25-2009, 09:50 PM
  2. [SOLVED] RSS Parse error: syntax error?
    By obrien in forum Questions & Comments
    Replies: 2
    Last Post: 02-18-2009, 02:56 PM
  3. Replies: 0
    Last Post: 12-25-2007, 01:20 PM
  4. Replies: 4
    Last Post: 08-14-2007, 01:03 PM
  5. Replies: 0
    Last Post: 06-08-2007, 05:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Pligg Modules and Pligg Templates from Pligg Pro Donate to Pligg CMS Dreamhost Web Hosting Host Gator Web Hosting