Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"." in query string messing up

Tags:

mysql

I was working with queries that the data is being used for the meta description.

UPDATE cards SET meta_description = 'Amy\'s bugs address labels are printed on recycled label paper. Available in quantities of 30. Each label is 2.5 x 1 inch with rounded corners.' WHERE card_id = 'al007'

I have noticed though that the period after paper is shortening the meta description to just "Amy's bugs address labels are printed on recycled label paper." If I remove the period the entire description will show up then. Does anyone know how to solve this tiny dilemma?

like image 370
Louis Stephens Avatar asked May 18 '11 15:05

Louis Stephens


2 Answers

I'm pretty sure that the issue is in whatever place you see the results. Most likely, there's a line feed after the period and your device does not support/show multi-line data. When you remove the period, you probably remove the carriage return as well.

like image 159
Álvaro González Avatar answered Nov 15 '22 08:11

Álvaro González


Try escaping the period with '\'

Since you say, by removing period, the whole sentence is getting updated, I assume there is no problem with the column size.

like image 29
Sachin Shanbhag Avatar answered Nov 15 '22 10:11

Sachin Shanbhag