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!

Spaces - the final frontier

Status
Not open for further replies.

CliffLandin

Programmer
Nov 14, 2004
81
US
I am not sure how to handle spaces in mysql. As it stands now, using &nbsp enters into the dbase as  or something like that. As a result, when I read from dbase the  is displayed. If the space is represented with %20 it displays properly, but I'm not sure how or why the %20 gets in the dbase in the first place.
I am pretty ignorant when it come to mysql, well, for that matter a bunch of other stuff too, but for the moment we are dealing with this.
So any help would be appreciated.
Thanks

When in doubt, go flat out!

 
If you want to have non-breaking spaces represented differently from ordinary spaces, you would need to store them using " " or something similar. Then, when you want to retrieve the contents of the field, you would either read the field as is, or have the non-breaking spaces converted to ordinary spaces by using "SELECT REPLACE(fieldname," "," ") ...".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top