Concat a string with a field

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
ljCharlie
Forum Contributor
Posts: 289
Joined: Wed May 19, 2004 8:23 am

Concat a string with a field

Post by ljCharlie »

Currently in the Website column, I have http://www.mysite.com and I want to add http:// infront of the http://www.mysite.com. Here's what I did under phpMyAdmin interface.

UDPATE emaildir SET Website = CONCAT("http://", Website) WHERE Website <> "" //still not working
UDPATE emaildir SET Website ="http://" && Website WHERE Website <> "" //still not working

So any help will be appreciated.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

spelling UPDATE correctly is the first step :P

The first should be fine it appears..
ljCharlie
Forum Contributor
Posts: 289
Joined: Wed May 19, 2004 8:23 am

Post by ljCharlie »

Thank you very much! I guess a fresh set of eyes would help.

Again, thanks!
Post Reply