Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Bug on data update

forums forums SQLyog SQLyog: Bugs / Feature Requests Bug on data update

  • This topic is empty.
Viewing 3 reply threads
  • Author
    Posts
    • #8537
      Nycran
      Member

      If you have a field called 'Index' that is a primary key in a table then Yog throws and sql error when updating the records in the data editor. The solution is to put '`' characters around the word 'Index'. To demonstrate, compare:

      UPDATE mytable

      SET field1 = 'hello'

      WHERE Index = 5;

      to:

      UPDATE mytable

      SET field1 = 'hello'

      WHERE `Index` = 5;

      The top query will fail because it doesn't have the backtick character around the word 'Index'.

      Thank you.

      Andy Chapman.

    • #16197
      CalEvans
      Member

      The answer is not to use mysql keywords as database, table or field names.

      This is not a bug in SQLYog.

      =C=

    • #16198
      Ritesh
      Member

      This issue has already been fixed in our 3.8 development tree. From 3.8, SQLyog will put backticks around all object names.

      Still it is advised that you dont use MySQL keywords as db,table, index etc. names 🙂

    • #16199
      Nycran
      Member

      Brilliant, thank you. I agree with Cal that keywords shouldn't be used, but, when you have no choice (ie, the database schema is not in your control), what's a guy supposed to do?

      Cheers,

      Andy Chapman.

Viewing 3 reply threads
  • You must be logged in to reply to this topic.