Jump to content

Query ?


ainoy31

Recommended Posts

Cannot help you until you show what you are getting, because we only see the information in your post and so far you have not provided any specific information to go by.

 

Have you checked if your data in the table contains any non-printing/white-space characters?

 

Edit: and assuming that you have read the documentation for what you are doing -

LENGTH(str)

 

Returns the length of the string str, measured in bytes. A multi-byte character counts as multiple bytes. This means that for a string containing five two-byte characters, LENGTH() returns 10, whereas CHAR_LENGTH() returns 5.

 

Are you using any multi-byte character encoding?

Link to comment
https://forums.phpfreaks.com/topic/162812-query/#findComment-859149
Share on other sites

from the mysql manual, the LENGTH() function returns the string's length in bytes, not in characters:

 

LENGTH() in MySQL manual

 

try using CHAR_LENGTH() and see if that fixes your issue. otherwise try actually echoing length in each iteration to see what it contains.

Link to comment
https://forums.phpfreaks.com/topic/162812-query/#findComment-859150
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.