Menu

You have an error in your SQL syntax near '3,

Kristof
2003-06-24
2003-08-04
  • Kristof

    Kristof - 2003-06-24

    You have an error in your SQL syntax near '3,'test','this is a test','http://www.test.be','','','','',1 )' at line 1

    i get this error wheni trie to add links....

    please help me

     
    • Glenn Rice

      Glenn Rice - 2003-07-02

      I'm getting the same message as you.

      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 '1,'Test Site','this is my testlink','http://test.c

      Anyone else got any clues?

       
    • D

      D - 2003-07-07

      No clue.

      Getting the same error message as Glen.

       
    • Frank Doerr

      Frank Doerr - 2003-07-29

      If got the same problem:
      You have an error in your SQL syntax near '1,'Reikiland.de','Dieses ReikiPortal bietet OnlinePublikationen in Form von Arti' at line 1

      Maybe, I miss a ' after 1?

       
    • Ludovic Drolez

      Ludovic Drolez - 2003-07-31

      which version ?!

       
    • Ludovic Drolez

      Ludovic Drolez - 2003-07-31

      and which php version ??
      At line 1 ? It's maybe a php problem because there's no SQL statements at line 1 anywhere...

       
    • Frank Doerr

      Frank Doerr - 2003-08-01

      Thanks for your answer!

      The php-version is 4.2.3 (look at http://faq.puretec.de/skripte/php/6.php\). MySQL is 3.23.46. And the latest mythreads-version: 0.9.1

       
    • Frank Doerr

      Frank Doerr - 2003-08-01

      All my Provider in Germany support no more PHP3. Therefore I changed everything in PHP, a small experiment. But the result is nearly the same:
      You have an error in your SQL syntax near '1,'ReikiForum.net','Diskutieren','www.reikiforum.net',NOW(),'','','',0 )' at line 1

       
    • Ludovic Drolez

      Ludovic Drolez - 2003-08-01

      > Therefore I changed everything in PHP
      You don't need to, index.php is here for that purpose, and you also have to modify $start_script and
      $linkbackurl in config.php3.

       
    • Ludovic Drolez

      Ludovic Drolez - 2003-08-01

      Are you adding in admin mode (Add a link directly into the database) or in 'user' mode just after you click on the [submit link] button ?

       
    • Frank Doerr

      Frank Doerr - 2003-08-01

      >you also have to modify $start_script and
      $linkbackurl in config.php3.

      I know. It was a test.
      For me, mythreads is a great script. But the problem with the syntax error is disturbing a little. I would
      bring the Script gladly to running...

       
    • Frank Doerr

      Frank Doerr - 2003-08-01

      >Are you adding in admin mode or in 'user' mode just after you click on the button ?

      Both (but not in phpMyAdmin). The error is always the same.

       
    • Frank Doerr

      Frank Doerr - 2003-08-01
       
    • Ludovic Drolez

      Ludovic Drolez - 2003-08-04

      I've found the problem and you get it with an empty database. Here is the patch:

      --- lib_main.php3       26 Jul 2003 15:05:46 -0000      1.59
      +++ lib_main.php3       4 Aug 2003 15:23:01 -0000
      @@ -413,6 +415,7 @@
                } else {
                  # Assign an idx
                  $max = mysql_fetch_array(mysql_query("select MAX(idx)+1 from ".$config["pre"]."links"));
      +           if ($max[0] == "") $max[0] = 1;
                  $HTTP_POST_VARS[idx] = $max[0];
                  $new = 1;
                }

      It will added be in the next release (soon).
      Cheers,
          Ludo

       
    • Frank Doerr

      Frank Doerr - 2003-08-04

      Thanks for your help, but the patch don't work:

      Parse error: parse error in /homepages/2/d21784220/htdocs/reiki/main/links/lib/lib_main.php3 on line 415

      Fatal error: Call to undefined function: message() in /homepages/2/d21784220/htdocs/reiki/main/links/lib/lib_main.php3 on line 104

      My lib_main.php3:

      } else {
                  # Assign an idx
                  $max = mysql_fetch_array(mysql_query("select MAX(idx)+1 from ".$config["pre"]."links"));
                  #patchbegin
                  + if ($max[0] == "") $max[0] = 1;
                  #patchend
                  $HTTP_POST_VARS[idx] = $max[0];
                  $new = 1;
                }

       
    • Frank Doerr

      Frank Doerr - 2003-08-04

      Okay, it work's without the +:

      #patchbegin
      if ($max[0] == "") $max[0] = 1;
      #patchend

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.