Announcement

Collapse
No announcement yet.

Error vbblog and vbulletin 3.7

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error vbblog and vbulletin 3.7

    Just installed vbblog and when I click on "post to your Blog" I get this error:

    Database error in vBulletin 3.7.0 Beta 5:

    Invalid SQL:

    SELECT blog.blogid, lastblogtextid AS blogtextid, blog_text.userid, blog_text.state, IF(blog_text.userid = 0, blog_text.username, user.username) AS username, blog.blogid, blog.title
    FROM vb_blog AS blog
    LEFT JOIN vb_blog_text AS blog_text ON (blog.lastblogtextid = blog_text.blogtextid)
    LEFT JOIN vb_user AS user ON (blog_text.userid = user.userid)
    WHERE blog.userid = 1
    AND blog_text.blogtextid <> blog.firstblogtextid
    AND blog_text.state IN ('visible','moderation','deleted')
    AND blog.state IN ('visible','moderation')
    AND blog.dateline <= 1203688965
    AND blog.pending = 0
    ORDER BY blog.lastcomment DESC
    LIMIT 5;

    MySQL Error : Illegal mix of collations (utf8_general_ci,IMPLICIT) and (latin1_swedish_ci,IMPLICIT) for operation 'if'
    Error Number : 1267

  • #2
    You need to make sure that the collations on all tables and all fields are the same. It appears that your default is different than what some tables and fields are using. You can set table and field collations in newer versions of phpMyAdmin.
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment


    • #3
      ALTER TABLE `vb_blog_attachmentviews` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci

      how is the sql query if I want to change all vb_blog? In sql a joker is % but when I try

      ALTER TABLE `vb_blog%` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci

      I get a sql error message

      Comment


      • #4
        I changed all vb_blog tables to latin1 but still the same errors

        Comment


        • #5
          ALTER TABLE does not support wildcards for the table name.

          You should be using this query though:
          ALTER TABLE tbl_name CONVERT TO CHARACTER SET charset_name

          From the MySQL 5.0.X manual on ALTER TABLE
          If you want to change the table default character set and all character columns (CHAR, VARCHAR, TEXT) to a new character set, use a statement like this:

          ALTER TABLE tbl_name CONVERT TO CHARACTER SET charset_name;

          For a column that has a data type of VARCHAR or one of the TEXT types, CONVERT TO CHARACTER SET will change the data type as necessary to ensure that the new column is long enough to store as many characters as the original column. For example, a TEXT column has two length bytes, which store the byte-length of values in the column, up to a maximum of 65,535. For a latin1 TEXT column, each character requires a single byte, so the column can store up to 65,535 characters. If the column is converted to utf8, each character might require up to 3 bytes, for a maximum possible length of 3 × 65,535 = 196,605 bytes. That length will not fit in a TEXT column's length bytes, so MySQL will convert the data type to MEDIUMTEXT, which is the smallest string type for which the length bytes can record a value of 196,605. Similarly, a VARCHAR column might be converted to MEDIUMTEXT.

          To avoid data type changes of the type just described, do not use CONVERT TO CHARACTER SET. Instead, use MODIFY to change individual columns. For example:

          ALTER TABLE t MODIFY latin1_text_col TEXT CHARACTER SET utf8;
          ALTER TABLE t MODIFY latin1_varchar_col VARCHAR(M) CHARACTER SET utf8;

          If you specify CONVERT TO CHARACTER SET binary, the CHAR, VARCHAR, and TEXT columns are converted to their corresponding binary string types (BINARY, VARBINARY, BLOB). This means that the columns no longer will have a character set and a subsequent CONVERT TO operation will not apply to them.
          Translations provided by Google.

          Wayne Luke
          The Rabid Badger - a vBulletin Cloud demonstration site.
          vBulletin 5 API

          Comment

          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
          Working...
          X