Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BLOB Field and Quotes Problem

Status
Not open for further replies.

Michael42

Programmer
Oct 8, 2001
1,454
US
Hello,

I have a mySQL 4 database with a text\blob field type being accessed via a php <textarea> tag. This <textarea> is used to handle memo type entries. I think I have narrowed my problem down to...quotes(' &quot;). Single and double.

If I have a memo entry with no quotes my updates work. If I have multiple embedded quotes my updates do not work. It would be a monstrous task to remove the quotes from the data and greatly decrease usability if I did so.

Works:
UPDATE articles SET Category='Access',Title='Expand Memo or Text Box',Memo='Shift-F2' WHERE id=823

No Work:
UPDATE articles SET Category='Access',Title='Expand Memo or Text Box',Memo='Shift-F2'' WHERE id=823


How would you recommend handling memo type files with single and double quotes?

P.S. The data was imported from Access and the field in question was a memo type.


Thanks,

Michael42
 
RISTMO,

Thanks for the reply. My example is a microcosm of my data. Some of my BLOB fields may have 2-5k of comments that contain single and double quotes.

Would simply adding a forward slash to the begining or end address this (Memo=\Bla ba&quot; bla bla's. More bla bla's\ )?

Thanks for your help,

Michael42
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top