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

Update Problem

forums forums SQLyog Using SQLyog Update Problem

  • This topic is empty.
Viewing 3 reply threads
  • Author
    Posts
    • #9746
      jameswoo
      Member

      I upgrate to 5.14 today because version 5.11 can't run in windows 98.

      But I found something different in 5.11.

      When I want to change a column with a string like 'ceiling(msl/8)' in data window, it reports 'unkown column 'msl' in 'field list'. In the history window, it use set column_name=ceiling(msl/8) as the update parameter.

      In fact, I don't want to treat the ‘ceiling’ as a function, and in 5.11 it's just save the whole string.

      Can anyone tell me how to save this string in a column?

      Thank you!

    • #21917
      peterlaursen
      Participant

      Yes, I can tell.

      Please read: http://webyog.com/faq/8_99_en.html

      .. so what you need to do is to enclose the literal string in backticks/backquotes like

      Code:
      `ceiling(msl/8)`

      Now watch the HISTORY tab and see what it actually sends to MySQL!

      .. but actually nobody ever told me that it now is possible to use functions and have them evaluated. So I guess that I will have to update the FAQ with that.


      @Ritesh
      /Sarat: intended behaviour? It would be 'smart' if it only attempted to evaluate functions that actually exist! It could use the functions-list from 'keywords.db' file !!

    • #21918
      jameswoo
      Member

      Well, the problem has been solved now! 😆

      Thank you!

    • #21919
      peterlaursen
      Participant

      Another consideration:

      In a numerical field you can use functions like round(7.9,0)

      and it sends:

      update `tablename1` set `id`=round(7.9,0) … where …

      and 8 is inserted as the function is evaluated to 8 by the server.

      however you cannot use expressions like 7+3

      it sends

      update `tablename1` set `id`='7+3' … where …

      .. but the server does not evaluate the expression, because it is sent as a string.

      What about an Excel-like formula notation (using '=') like '=7+3'

      .. so that SQLyog will do

      update `tablename1` set `id`=7+3 … where … (no quotes!)

      BTW: I think it should be a configuration option to turn on/off evalutation of expressions and functions.

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