Get ASCII Results in MySql cli Queries -


I am trying to put the following value in mysql table:

  lT ~ : Uc9% 7 4M ?; ~ = 0 = ^  

So I:

  update table set field = 'lt ~: uc9% 7 \ 04M? ; ~ = 0 = ^ 'where id =' 1 ';  

When I select I:

 choose  from the table where id = '1';  

Result:

  lt ~: uc9% 7 4m ?; ~ = 0 = ^  

I know this is because \ 0 is interpreted as a place. How can i get around this. I need to get the actual value \ <

if you want to get value

   lt ~: uc9% 7 \ 04M ?; ~ = 0 = ^  

> Update your table set field = 'lt ~: uc9% 7 \\ 04M ?; ~ = 0 = ^ 'where id =' 1 ';

Because backslash is the escape character of MySQL, see

  Escape sequence | Character shown by sequence --------------------------------------------- - ------ \ 0 | An ASCII NUL (0x00) character \\ | Backslash ("\") character  

Therefore \ 0 is not interpreted as a location if you want to use a location in a string , Then just use one location.


Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -