Solved

MySQL Query Help

Posted on 2012-04-04
2
353 Views
Last Modified: 2012-04-04
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
Comment
Question by:GVNPublic123
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 21

Accepted Solution

by:
oleggold earned 500 total points
ID: 37808297
try
 update videos2 set short = replace(short, "on.fb.me", "bit.ly") WHERE length('short') > 0
0
 

Author Comment

by:GVNPublic123
ID: 37808318
That worked. Stupid semicolons.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Recently, Microsoft released a best-practice guide for securing Active Directory. It's a whopping 300+ pages long. Those of us tasked with securing our company’s databases and systems would, ideally, have time to devote to learning the ins and outs…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question