PDOException: SQLSTATE[42000] error in Biblio

Events happening in the community are now at Drupal community events on www.drupal.org.
marcelolaia's picture

After add my publications, I got the error: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064

PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 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 ' '114', '117', '100', '101', '111', '116', '123', '127', '103', '104', '125', '1' at line 1: SELECT t.* FROM {biblio_types} as t WHERE t.tid=:tid_112, :tid_114, :tid_117, :tid_100, :tid_101, :tid_111, :tid_116, :tid_123, :tid_127, :tid_103, :tid_104, :tid_125, :tid_110, :tid_126, :tid_115, :tid_131, :tid_102, :tid_128, :tid_106, :tid_121, :tid_122, :tid_129, :tid_130, :tid_105, :tid_119, :tid_120, :tid_135, :tid_109, :tid_113, :tid_118, :tid_108, :tid_124, :tid_107, :tid_134, :tid_133, :tid_132; Array ( [:tid_112] => 112 [:tid_114] => 114 [:tid_117] => 117 [:tid_100] => 100 [:tid_101] => 101 [:tid_111] => 111 [:tid_116] => 116 [:tid_123] => 123 [:tid_127] => 127 [:tid_103] => 103 [:tid_104] => 104 [:tid_125] => 125 [:tid_110] => 110 [:tid_126] => 126 [:tid_115] => 115 [:tid_131] => 131 [:tid_102] => 102 [:tid_128] => 128 [:tid_106] => 106 [:tid_121] => 121 [:tid_122] => 122 [:tid_129] => 129 [:tid_130] => 130 [:tid_105] => 105 [:tid_119] => 119 [:tid_120] => 120 [:tid_135] => 135 [:tid_109] => 109 [:tid_113] => 113 [:tid_118] => 118 [:tid_108] => 108 [:tid_124] => 124 [:tid_107] => 107 [:tid_134] => 134 [:tid_133] => 133 [:tid_132] => 132 ) in _biblio_filter_info_line() (line 610 of /home/user/public_html/profiles/openscholar/modules/contrib/biblio/includes/biblio.pages.inc).

How I could solve it?

Thank you very much!

Comments

Any tip to solve?

marcelolaia's picture

Here is the code in near line 610. The first (switch ($sort) {) line is 609.

  switch ($sort) {
    case 'title':
      $title = $node->biblio_sort_title;
      $first = drupal_substr(drupal_ucfirst(ltrim($title)), 0, 1);
      if ( $first  != $_text) {
        if ($_text != '' ) {
          $content .= theme_biblio_end_category_section();
        }
        $_text =  $first ;
        $content .= theme_biblio_separator_bar($_text);
      }
      break;
    case 'author':
      if ( (isset($node->biblio_contributors[0]['lastname'])) &&
      (drupal_substr(drupal_ucfirst(ltrim($node->biblio_contributors[0]['lastname'])), 0, 1) != $_text))
      {
        if ($_text != '' ) {
          $content .= theme_biblio_end_category_section();
        }
        $_text = drupal_substr(drupal_ucfirst(ltrim($node->biblio_contributors[0]['lastname'])), 0, 1) ;
        $content .= theme_biblio_separator_bar($_text);
      }
      break;
    case 'type':
      if ($node->biblio_type_name != $_text) {
        if ($_text != '' ) {
          $content .= theme_biblio_end_category_section();
        }
        $_text = $node->biblio_type_name;
        //      $name = db_result(db_query("SELECT name FROM {biblio_types} as t where t.tid=%d", $node->biblio_type)) ;
        $content .= theme_biblio_separator_bar(_biblio_localize_type($node->biblio_type, $_text));
      }
      break;
    case 'keyword':   // added msh 08 aug 07
      // $kw = array_shift($node->biblio_keyword);
      $tok = $node->biblio_keyword;
      if (empty($tok)) {
        $tok = t("No Keywords");
      }
      if ($tok != $_text) {
        if ($_text != '' ) {
          $content .= theme_biblio_end_category_section();
        }
        $_text = $tok;
        if ($_text != '') {
          $content .= theme_biblio_separator_bar($_text);
        }
      }
      break;
    case 'year':
    default:
      if ($node->biblio_year != $_text) {
        if ($_text != '' ) {
          $content .= theme_biblio_end_category_section();
        }
        $_text = $node->biblio_year;
        $content .= theme_biblio_separator_bar($_text);
      }
  } //end switch

Any hint to solve or debug that issue?

marcelolaia's picture

Hi,

Have you any tip/hint to debug or solve that problem?

How I could start to look around a solution? How I could to start a figure out the problem?

OpenScholar

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: