phpmyadmin - Mysql insert a tilde ~ in a record -


i having little issue trying change part of url in mysql url has tilde in it.

current site has url of domain.com/admin/. because needed use shared ssl cert, have add tilde linux username in front of it, /~crr/admin/. novice @ writing sql, , have searched this, can't find problem.

here trying , thats when character error.

update menu_items  set menu_links = replace(menu_links, "/admin/", "/~crr/admin/"); 

i tried without tilde , works, pretty sure tilde causing it.

can try single quotes:

update menu_items  set    menu_links = replace(menu_links, '/admin/', '/~crr/admin/'); 

i don't remember ~ being reserved character in mysql. if above doesn't work try escaping ~ (phpmyadmin uses ~ guess when showing approximate data counts)

update menu_items  set    menu_links = replace(menu_links, '/admin/', '/\~crr/admin/'); 

Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -