510 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Has sold $1,000+ on Envato Market
  • Has been a beta tester for an Envato feature
+4 more
pxt says

Hi there,

I’ve just started to use MySQLi (I normally just use MySQL Connect, etc) and have encountered a problem.

If I fetch some data from a table, even if the field is of the type ‘text’, it is truncated to a maximum of 256 characters.

Someone else is having a similar issue: http://www.jodymickey.com/?p=38

Any help is appreciated!

510 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Has sold $1,000+ on Envato Market
  • Has been a beta tester for an Envato feature
+4 more
pxt says

bump

Any ideas about this?

409 posts
  • Has been part of the Envato Community for over 4 years
  • Sells items exclusively on Envato Market
  • Located in India
Dhruv says

Sorry, but i don’t have any idea about this,

You can try posting it here : http://www.stackoverflow.com, you will get answers within minutes.

2529 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 10+ members
  • Has sold $40,000+ on Envato Market
  • Interviewed on an Envato blog
+11 more
JeffreyWay says

It’s got to be an issue on your end. MySQLi doesn’t truncate the results, unless you specify so. Can you paste in some code?

128 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 500+ members
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
jackpotsoft says

may be its an input validation

text datatype is too big , cant be limited at 256

You can also Try Blob. Make sure , Input is not being processed some where.

510 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Has sold $1,000+ on Envato Market
  • Has been a beta tester for an Envato feature
+4 more
pxt says

I’ll just put an example up on github in a second and post a link here…

510 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Has sold $1,000+ on Envato Market
  • Has been a beta tester for an Envato feature
+4 more
pxt says

Here’s the link: https://github.com/Pexat/MySQLiTesting-TEMP-

There’s also a mysql dump of the test database in there

Thanks for all the help!

510 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Has sold $1,000+ on Envato Market
  • Has been a beta tester for an Envato feature
+4 more
pxt says

Has anyone had a chance to look at this?

2 posts
  • Has been part of the Envato Community for over 4 years
  • Has collected 1+ items on Envato Market
Altrea says

I have tested your script on my localhost. Both scripts gave me the exact the same output:

“Number of characters in body field: 3493”

So the problem must be somewhere else.

409 posts
  • Has been part of the Envato Community for over 4 years
  • Sells items exclusively on Envato Market
  • Located in India
Dhruv says

It’s working perfectly (tested on localhost).

Which version of PHP and MySQL are you using??

Are you sure you are using the exact same code which you uploaded on GitHub?

by
by
by
by
by
by