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

Storing Path Names – Prob

forums forums SQLyog Using SQLyog Storing Path Names – Prob

  • This topic is empty.
Viewing 3 reply threads
  • Author
    Posts
    • #9450
      snowman53
      Member

      Hi,

      I am trying to store Windows file path names as varchar (using the default character set).

      However, the back slash is dropped and the string is truncated.

      I have tried putting the path string in quotes, but it still drops the back slash. I also tried using varbinary and text types with the same result.

      Suggestions?

      Thanks!

    • #20291
      peterlaursen
      Participant

      I can easily do that (of course). See attached!

      Which version of SQLyog do you use? a very old SQLyog version maybe? Well it has to be VERYVERYVERY old then …

      Also have a look at HISTORY pane. When inserting 'c:backslash' the SQL would be like

      Code:
      insert into `test2`.`TableName1` ( `id`, `t` ) values (  '',  'c:\backslash' )

      This is the correct escaping!

      Suggestions? Well … answer all what we ask for here:

      http://www.webyog.com/faq/6_26_en.html

      .. especially I would like to know if you use HTTP-tunnelling.

    • #20292
      peterlaursen
      Participant

      AHA … 😀

      Tell me: do you use the GUI or do you write statements yourself ?

      no. 2 – right ??

      Did you ever study the use of escaping within strings:

      http://dev.mysql.com/doc/refman/5.0/en/string-syntax.html

      Also see attached!

      and BTW: I don't think that even the very first SQLyog (ver 0.9) had such a bug with the GUI! Though I never tried it!

      If it is not an 'Error 40' then it possibly could be a PHP mal-configuration!

      (an 'Error 40' is when the error is 40 centimeters from the monitor 😆 )

    • #20293
      peterlaursen
      Participant

      BTW: let me remind you of one detail more. If you have a mycolumn contaning a string 'c:folderfile'

      and you would find all entries starting with the substring 'c:folder' you must write SQL like

      Code:
      SELECT …. FROM mytable WHERE mycolumn LIKE 'c:\\folder\\%'

      When parsed with LIKE '\\' is stripped down to '\' – next '\ is considered an escaped '' , that is a literal ''.

      to put it another way:

      Code:
      SELECT 'backs\ash' LIKE '%\\%'

      returns TRUE. And it is the ONLY correct way to do it!

      See another example with the data from above in attached.

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