#417 MYSQL DATENBANK

open
nobody
None
1
2013-11-29
2013-11-18
Anonymous
No

MRBS 1.4.10

Fatal 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, '', 0, '')' at line 1

Why does it happens?

Discussion

  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2013-11-18

    Can you give a little more detail - what are the steps to reproduce this?

    Campbell

     
    Last edit: Anonymous 2014-03-29
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2013-11-18

    when i try to enter serial records (e.g. weekly or monthly), then i get the information

    Fatal 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, '', 0, '')' at line 1

     
  • Campbell Morrison

    Have you got any custom fields? If so what are they called and what's their type (eg TINYINT, VARCHAR(10) etc)?

    Campbell

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2013-11-18

    Custom fields? Please see Attachement.

     
    Attachments
  • Campbell Morrison

    No, you don't have any custom fields. Is there any more information in the error message, eg a file name? Does the error always happen, or does it depend on the data you are trying to save? Has the problem just started happening, or has it always been there?

    Campbell

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2013-11-18

    There aren't more information in the error message. The error always happens when i try to save data by klicking on "Save" button.

     
  • Campbell Morrison

    Can you insert the following debugging line

      echo "$sql <br>";
    

    at line 576 of mrbs_sql.inc and let me know what the output is?

    [ie just after $sql = "INSERT INTO ... in the function function mrbsCreateEntry($table, $data)]

    Thanks,

    Campbell

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2013-11-18

    the same error line appears ...

    Fatal 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, '', 0, '')' at line 1

     
  • Campbell Morrison

    Does the error always happen, or does it depend on the data you are trying to save? Has the problem just started happening, or has it always been there?

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2013-11-18

    the error always happens independently from the data i'm trying to save; it wasn't always been there, only since i have updated at the version 1.4.10

     
  • Campbell Morrison

    What version were you running before you updated?

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2013-11-18

    i think it was 1.4.7

     
  • Campbell Morrison

    I've tried an upgrade from 1.4.7 to 1.4.10 and I still can't reproduce this. It's possible that not all the files were uploaded properly when you did the update. Could you try re-uploading all the 1.4.10 files and directories please (except the config file)?

    If you're still getting the problem could you insert the line

    error_reporting (-1);
    

    at line 400 in internalconfig.inc.php, ie just after the line

    error_reporting ($error_level);
    

    and let me know what output you get when you try to make the repeat booking.

    Thanks,

    Campbell

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2013-11-20

    Thanks.

    I've done all this, but the error ist the same ...

     
  • Campbell Morrison

    Can you add the following code at line 400 in internalconfig.inc.php

    error_reporting (-1);
    
    set_error_handler("debug_error_handler");
    function debug_error_handler($errno, $errstr, $errfile, $errline)
    {
      if ((strpos($errstr, "is_a(): Deprecated. Please use the instanceof operator") === FALSE) &&
          (strpos($errstr, "Non-static method PEAR::isError()") === FALSE) &&
          (strpos($errstr, "Non-static method Mail::factory()") === FALSE))
      {
        echo "DEBUG: Error no. $errno $errstr at line $errline in file $errfile<br>";
      }
      switch ($errno)
      {
        case E_ERROR:
        case E_CORE_ERROR:
        case E_COMPILE_ERROR:
          exit;
          break;
      }
    }
    

    and let me know what the error message is.

    Thanks,

    Campbell

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2013-11-20

    Error no. 8 Undefined variable: select_options at line 688 in file ... edit_entry.php

     
  • Campbell Morrison

    Thanks. Have you made any changes to MRBS? And what error message do you get when you save the booking?

    Campbell

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2013-11-20

    no changes

    saving is not posssible because i get then the error

    Fatal 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, '', 0, '')' at line 1

     
  • Campbell Morrison

    You should get some additional information about the line number and file that's causing the fatal error.

    Anyway, I think that somehow your installation of 1.4.10 hasn't worked. The error message "Undefined variable: select_options at line 688 in file ... edit_entry.php" isn't possible in 1.4.10 because there is no variable $select_options at line 688. In fact that variable is only used once, on line 267. However $select_options does occur at line 688 in the MRBS 1.4.5 version of edit_entry.php (and possibly some versions before that) which is what makes me think that the upgrade hasn't worked. You need to make sure that all the files, with the exception of the config file, in the web directory and sub-directories of 1.4.10 are successfully uploaded to the web server.

    Campbell

     
  • Campbell Morrison

    Just wondering if you managed to solve the problem?

    Campbell

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2013-11-25

    no, i have no idea ...

     
  • Campbell Morrison

    What you need to do is to upload again all the files, except for the config file, in the web directory of the 1.4.10 release to your web server. You need also to make sure that all the files in sub-directories such as auth, Blowfish, css, etc. are also uploaded. Make sure that none of the transfers failed. Then try MRBS again.

    Campbell

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2013-11-29

    The transfer is ready; all files are transfered, but there is the same error ...

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2013-11-29

    Can you add this code again please at line 400 in internalconfig.inc.php and let me know what error messages you get (a) on the booking form and (b) when you try and save the booking.

    error_reporting (-1);
    
    set_error_handler("debug_error_handler");
    function debug_error_handler($errno, $errstr, $errfile, $errline)
    {
      if ((strpos($errstr, "is_a(): Deprecated. Please use the instanceof operator") === FALSE) &&
          (strpos($errstr, "Non-static method PEAR::isError()") === FALSE) &&
          (strpos($errstr, "Non-static method Mail::factory()") === FALSE))
      {
        echo "DEBUG: Error no. $errno $errstr at line $errline in file $errfile<br>";
      }
      switch ($errno)
      {
        case E_ERROR:
        case E_CORE_ERROR:
        case E_COMPILE_ERROR:
          exit;
          break;
      }
    }
    

    Thanks,

    Campbell

     


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks