Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 364
  • Last Modified:

MySQL Query Help

Ok,

So I have a table, with field 'short' that contains shortened version of urls.
Right now row['short'] on each row would outuput links like this:
on.fb.me/zzV01q

But I want it to output:
bit.ly/zzV01q

So I tried this:
update videos2 set short = replace(short, ‘on.fb.me’, ‘bit.ly’) WHERE length('short') > 0

Open in new window


But It gives me error:
#1054 - Unknown column '‘on.fb.me' in 'field list'

short is a varchar(30)       utf8_general_ci        by structure.
0
GVNPublic123
Asked:
GVNPublic123
1 Solution
 
oleggoldCommented:
try
 update videos2 set short = replace(short, "on.fb.me", "bit.ly") WHERE length('short') > 0
0
 
GVNPublic123Author Commented:
That worked. Stupid semicolons.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now