MySQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsDatabasesMySQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 10th, 2004, 08:41 AM
McKenna's Avatar
McKenna McKenna is offline
Purple is a Fruit
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Ireland
Posts: 404 McKenna User rank is First Lieutenant (10000 - 20000 Reputation Level)McKenna User rank is First Lieutenant (10000 - 20000 Reputation Level)McKenna User rank is First Lieutenant (10000 - 20000 Reputation Level)McKenna User rank is First Lieutenant (10000 - 20000 Reputation Level)McKenna User rank is First Lieutenant (10000 - 20000 Reputation Level)McKenna User rank is First Lieutenant (10000 - 20000 Reputation Level)McKenna User rank is First Lieutenant (10000 - 20000 Reputation Level)McKenna User rank is First Lieutenant (10000 - 20000 Reputation Level)  Folding Points: 100969 Folding Title: Super Ultimate Folder - Level 1Folding Points: 100969 Folding Title: Super Ultimate Folder - Level 1Folding Points: 100969 Folding Title: Super Ultimate Folder - Level 1Folding Points: 100969 Folding Title: Super Ultimate Folder - Level 1Folding Points: 100969 Folding Title: Super Ultimate Folder - Level 1Folding Points: 100969 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Days 2 h 27 m 38 sec
Reputation Power: 169
Escaping HTML Strings Within MySQL

Hey,

I am wondering if it is possible to escape HTML strings within MySQL. I want to select a list of criteria from a MySQL table and concatenate them together to form a HTML select menu. However, some of the category names have HTML special characters in them (like < > and &). I am wondering if there is an internal function in MySQL to escapte HTML characters or would it be necessary to write a stored procedure or something along those lines? (Unfortunately I don't have access to MySQL 5.0 so I can't use Stored Procedures).

Thanks for you time!

Reply With Quote
  #2  
Old September 10th, 2004, 09:50 AM
r937's Avatar
r937 r937 is offline
SQL Consultant
Click here for more information.
 
Join Date: Feb 2003
Location: Toronto Canada
Posts: 26,373 r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level) 
Time spent in forums: 3 Months 1 Week 2 Days 6 h 53 m 41 sec
Reputation Power: 4140
use the replace function

select replace(replace(replace(categoryname,'&','&'),'<','<'),'>','>') as newname
from ...
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMySQL Help > Escaping HTML Strings Within MySQL

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap