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
Solved

MySQL Query Help

Posted on 2012-04-04
2
352 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
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Custom Wordpress Loop 22 38
TCPDF - Create PDF from Form Values and Link to PDF Download 7 24
Ajax and PHP 9 29
issue with DB import 1 17
This article discusses four methods for overlaying images in a container on a web page
As technology users and professionals, we’re always learning. Our universal interest in advancing our knowledge of the trade is unmatched by most industries. It’s a curiosity that makes sense, given the climate of change. Within that, there lies a…
The viewer will learn how to dynamically set the form action using jQuery.
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.

809 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