I think the other replies to this are missing the point.

You want to search a text field for the word Wash, and want to put the space in so you 
can search with the space, eliminating words which begin with wash. But then, if you 
think about it, that means you'd have to search for commas, and full stops. I don't 
think this is such a good way to do it. Try using regular expressions. I have never 
used regex on a db before, but I have seen a few people mention it. Have a go and if 
you find a solution, post it.


--- Original Message ---

How can I add a space to the end of a varchar string
in mysql?  I can't seem to do it directly, and I tried
str_pad and other things, but no luck so far.  The db
doesnt hold the value of the space...its getting
trimmed somewhere(?)

The reason I want to do this is so I can search for
exact matches on one word strings without stemming:
...WHERE name LIKE '$var %'.

If the user types 'Wash' I don't want any matches for
'Washington', 'Washing', etc.

Thank You All

Reply via email to