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

Insert problem using '\'

forums forums SQLyog Using SQLyog Insert problem using '\'

  • This topic is empty.
Viewing 2 reply threads
  • Author
    Posts
    • #7941
      u3003-04-23
      Member

      Hi,

      I am running mySQL v4 on win2k server for use with ASP.

      I have encountered a strange problem with my code:

      I have a web form which I use to enter info into my database, and this is

      the SQL which does the insert:

      INSERT INTO news (fldBody)

      VALUES ('”&Request.Form(“fldBody”)&”')

      What is happening is that whenever I type in a backslash into the code,

      mySQL does not insert it.

      So if I add e.g:

      C:inentpubwwwrootdata

      once it has been inserted and I run a SELECT from mySQL to get the new

      entry, I get the new value to be:

      C:inentpubwwwrootdata

      The fldBody data type is set to longtext

      ============================

      I then set up a new table in SQLyog, a simple one field one, longtext data type, and ran this SQL:

      insert into data (fldBody) VALUES ('c:test');

      and when I looked at the output it came out as:

      c: est

      =============================

      Anyone got any ideas?

      Thanks

      Jim

    • #14300
      Ritesh
      Member
      Quote:
      insert into data (fldBody) VALUES ('c:test');

      Change the query to

      insert into data (fldBody) VALUES ('c:\test');

      You have to escape the character '' with '\'

      HTH

    • #14301
      u3003-04-23
      Member

      Thanks Ritesh, that's great.

      Jim

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