Hi
I have a database which has a table named main and a field named description
typ of description is longtext
I can insert more than 100 word through phpmyadmin. but can't insert through form submit by post method. but Here i can insert 10 word through same form submit.
Even I can use echo with that form field having 100 words but no data is inserting in database. what is the problem
arctushar
0
Junior Poster in Training
Recommended Answers
Jump to PostLimits are based on characters and not by words. Longtext allows for 4GB of characters, so in theory it depends on how long your words are. It is possible to have ten words that contain more characters than 100 words. But I doubt this is the case. Some possible limitations …
Jump to PostThe problem is that you are not preparing the text for a SQL entry, so that apostrophe is editing the query that you are sending.
You can look up mysql_real_escape_string()[mysql recommended] or addslashes()[for non-specific databases] functions to resolve this issue.
Jump to Post
mysql_real_escape_string()
should be applied to any user generated content passed to MySQL to prevent SQL injections, but has no bearing on the limits on the text submitted (other than escaping characters).
The first thought that comes to mind is you aren't viewing the entire field. Try querying the …
All 9 Replies
FlashCreations
20
Posting Whiz
arctushar
0
Junior Poster in Training
Pirion1
0
Newbie Poster
arctushar
0
Junior Poster in Training
FlashCreations
20
Posting Whiz
arctushar
0
Junior Poster in Training
dsd_inc123
-2
Newbie Poster
FlashCreations
20
Posting Whiz
FlashCreations
20
Posting Whiz
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.