Posterous

once upon a life

a life worth living

Archive for

September 2011

Lawrence Samantha

Co-Founder of eEvent
Happen to love coding

TwitterFacebookFlickr
Lawrence Samantha's profile »

Tags

  • Personal Life (89)
  • Multimedia (36)
  • Jokes and some other thing (23)
  • Comments / Review (20)
  • Spirit (20)
  • News (16)
  • Gadget and Technology (12)
  • Travel (12)
  • Football (9)
  • personal (5)
  • View all 52 tags »
  • hope (4)
  • memory (4)
  • tech (4)
  • video (4)
  • columbus (3)
  • joke (3)
  • love (3)
  • wikiwalk (3)
  • indonesia (2)
  • weather (2)
  • Gallery (1)
  • IT (1)
  • ads (1)
  • airport (1)
  • android (1)
  • anniversary (1)
  • art (1)
  • doa (1)
  • faith (1)
  • food (1)
  • gadget (1)
  • game (1)
  • games (1)
  • google (1)
  • harapan (1)
  • health (1)
  • holiday (1)
  • lego (1)
  • linux (1)
  • motivational (1)
  • music (1)
  • needle (1)
  • recipe (1)
  • recording (1)
  • review (1)
  • semarang (1)
  • snow (1)
  • software (1)
  • soul (1)
  • tutorial (1)
  • vista (1)
  • windows (1)

Archive

2012 (2)
February (2)
2011 (31)
October (1)
September (1)
August (1)
July (1)
June (10)
May (5)
April (2)
March (10)
2009 (11)
October (1)
September (1)
May (1)
April (2)
March (2)
February (4)
2008 (1)
May (1)
2007 (1)
March (1)
Follow this Space »
You're following this Space (Edit)
You're a contributor here (Edit)
This is your Space (Edit)
Follow by email »
Get the latest updates in your email box automatically.
Loading...
Subscribe via RSS
September 13, 2011

TRIM Line Breaks & Carriage Return on MySQL

  • Edit
  • Delete
  • Tags
  • Autopost
The TRIM() function on MySQL remove leading and trailing spaces. But what if you want to remove line break / carriage return?

Its not pretty, but this works for me:

REPLACE(FIELD_NAME, '\r\n','')

Usage example:

Select FIELD_NAME 
From TABLE 
Where REPLACE(FIELD_NAME, '\r\n','')='NOLINEBREAK'
Tweet
  • 0 responses
  • Like
  • Comment