User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MS SQL section within the Web Development category of DaniWeb, a massive community of 423,532 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,340 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS SQL advertiser: Programming Forums
Views: 470 | Replies: 2
Reply
Join Date: Dec 2007
Posts: 3
Reputation: fclanton is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
fclanton fclanton is offline Offline
Newbie Poster

update on a column that is full of HTML

  #1  
Dec 26th, 2007
i have a column "discription" in my item table that is full of HTML code. It was created using and editor like the one i am using here. It is five pages long when i print it out.

I need to update the column in all records of the table. It is full of single and double quotes. In the quarey i am trying to use update and it really fails badley.

I can update one row at a time but with 10K of records it will take some time.

Can i wrap this code in sometinge that will allow SQL not to go nuts when i try to use it as an update

OR

Can i edit one record and set all of the other records to equal the edited one
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2007
Location: KSA
Posts: 147
Reputation: kb.net is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 26
kb.net's Avatar
kb.net kb.net is offline Offline
Junior Poster

Re: update on a column that is full of HTML

  #2  
Dec 31st, 2007
Hi,

How are you updating the table. 10K is not that big number when speaking about data bases.
It is never about the number of languages you know, you either have the logic of programming or you don't ...

Some of the codes I post are collected from different sites during the past couple of years, so I would like to thank them for their help and for enabling me to help.
Reply With Quote  
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation: nav33n has a spectacular aura about nav33n has a spectacular aura about 
Rep Power: 8
Solved Threads: 240
nav33n's Avatar
nav33n nav33n is offline Offline
Posting Sensei

Re: update on a column that is full of HTML

  #3  
Dec 31st, 2007
If you are updating using php, you can use mysql_real_escape_string or addslashes to escape all the special characters like \, ' and ".
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

*PM asking for help will be ignored*
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb MS SQL Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the MS SQL Forum

All times are GMT -4. The time now is 5:25 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC