Click to See Complete Forum and Search --> : unwanted carriage returns...


mostwanted
10-11-2006, 12:23 PM
I have a script that my friend made that will allow me to paste an unlimited number of images to a text box on my site's admin panel and it then writes the urls to the database of where those images are located....
Well alot of the images are on there...
but the problem is this...
there are a lot of the urls in the databse that have an unwanted carriage return before the http:

Is there anyway that I can delete these? I browse the individual table and it don't have the carriage return before or after the url...

What do I do??? :confused:

russell
10-12-2006, 11:05 PM
probably best to do it in the script. what language is it written in? also, what database are u using?

in mssql u could use something like this:

INSERT INTO myTable Values(
Replace(Replace(url, char(10), ''), char(13), '')
)

mostwanted
10-12-2006, 11:46 PM
Thank you for your reply...
I should of posted that I got it fixed...

All I did was export the sql file and load it in textpad and replaced the /r/d to nothing so it will delete all of them and then deleted the table and imported the table back... I wish I would of thought about it before.. would of saved a HUGE headache:p

Thank you for your reply...