- Beta Tester
- Bought between 10 and 49 items
- Contributed a Tutorial to a Tuts+ Site
- Exclusive Author
- Has been a member for 3-4 years
- Referred between 1 and 9 users
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Sold between 1 000 and 5 000 dollars
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!
- Beta Tester
- Bought between 10 and 49 items
- Contributed a Tutorial to a Tuts+ Site
- Exclusive Author
- Has been a member for 3-4 years
- Referred between 1 and 9 users
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Sold between 1 000 and 5 000 dollars
bump
Any ideas about this?
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.
- Attended a Community Meetup
- Author had a Free File of the Month
- Author was Featured
- Blog Editor
- Bought between 50 and 99 items
- Contributed a Tutorial to a Tuts+ Site
- Envato Staff
- Exclusive Author
- Featured in a Magazine
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?
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.
- Beta Tester
- Bought between 10 and 49 items
- Contributed a Tutorial to a Tuts+ Site
- Exclusive Author
- Has been a member for 3-4 years
- Referred between 1 and 9 users
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Sold between 1 000 and 5 000 dollars
I’ll just put an example up on github in a second and post a link here…
- Beta Tester
- Bought between 10 and 49 items
- Contributed a Tutorial to a Tuts+ Site
- Exclusive Author
- Has been a member for 3-4 years
- Referred between 1 and 9 users
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Sold between 1 000 and 5 000 dollars
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!
- Beta Tester
- Bought between 10 and 49 items
- Contributed a Tutorial to a Tuts+ Site
- Exclusive Author
- Has been a member for 3-4 years
- Referred between 1 and 9 users
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Sold between 1 000 and 5 000 dollars
Has anyone had a chance to look at this?
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.
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?
