Forums
This topic is locked
text gets truncated to fit in mysql
Posted 13 Jan 2005 17:32:44
1
has voted
13 Jan 2005 17:32:44 Geofrey Biggins posted:
Hi , iam trying to create a mysql table of press releases which are just a load of text no images. I have created a table with cust_id, heading, text. the trouble is when i insert a lot of text using a form it does not insert it but simply clears the form. If i cut down the text it goes in but only allows around 200 words. the field is set to longblob although i have tried blob, text, longtext and most other things. Our web host says that the default is 2mb at one time so there is no problem there. Please help. Replies
Replied 13 Jan 2005 21:01:31
13 Jan 2005 21:01:31 Chris Charlton replied:
I would chek your PHP script execution time, might be running out before it can process all the text.
BLOB should work fine. For reference here's the MySQL documentation for it:
<ul><li>The BLOB and TEXT Types - dev.mysql.com/doc/mysql/en/BLOB.html</li><li>Column Type Storage Requirements - dev.mysql.com/doc/mysql/en/Storage_requirements.html</li></ul>
BLOB should work fine. For reference here's the MySQL documentation for it:
<ul><li>The BLOB and TEXT Types - dev.mysql.com/doc/mysql/en/BLOB.html</li><li>Column Type Storage Requirements - dev.mysql.com/doc/mysql/en/Storage_requirements.html</li></ul>
Replied 14 Jan 2005 15:18:03
14 Jan 2005 15:18:03 Geofrey Biggins replied:
Thats kind of what i was thinking, but i have no idea how to change the timeout setting if thats what needs to be done. Your help is greatly appreciated.
Replied 14 Jan 2005 15:39:31
14 Jan 2005 15:39:31 the GH1 replied:
Read this somewhere, dont know if it will point ya in right direction but
max_execution_time
Maximum time a PHP script will execute before timing out. Even if this is set to "off", the execution time can be defined on a per-script basis using the set_time_limit() function.
Example:
Set maximum execution time to 1 minute.
max_execution_time = 60
-------------------------------------------
"You want it to do what?....You gotta be kiddin"
max_execution_time
Maximum time a PHP script will execute before timing out. Even if this is set to "off", the execution time can be defined on a per-script basis using the set_time_limit() function.
Example:
Set maximum execution time to 1 minute.
max_execution_time = 60
-------------------------------------------
"You want it to do what?....You gotta be kiddin"
Replied 18 Jan 2005 14:11:30
18 Jan 2005 14:11:30 Geofrey Biggins replied:
Thanks for the help. ive looked at phpinfo and noted that the max_input_time is -1. it says on the php website it should be default 30. is this what my problem is likely to be?. if so how do i change it.
Replied 18 Jan 2005 20:52:29
18 Jan 2005 20:52:29 Chris Charlton replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>...ive looked at phpinfo and noted that the max_input_time is -1. it says on the php website it should be default 30. is this what my problem is likely to be?. if so how do i change it.<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Check out us4.php.net/function.set-time-limit, and us2.php.net/info .
Check out us4.php.net/function.set-time-limit, and us2.php.net/info .
Replied 21 Jan 2005 18:07:38
21 Jan 2005 18:07:38 Geofrey Biggins replied:
As is always the case the answer to my problem was shockingly simple. Turns out that in dreamweaver if you create a form to insert text with a text area, even though when you paste into the area it expands the scroll bar it goes up and down, when you press submit it only actually submits text to the set size of the text area not the amount you can put in. so i just set the size to 100 wide by 150 lines to insert lots of text. thanks for the replies anyway.
Replied 21 Jan 2005 20:12:23
21 Jan 2005 20:12:23 Chris Charlton replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>As is always the case the answer to my problem was shockingly simple. Turns out that in dreamweaver if you create a form to insert text with a text area, even though when you paste into the area it expands the scroll bar it goes up and down, when you press submit it only actually submits text to the set size of the text area not the amount you can put in. so i just set the size to 100 wide by 150 lines to insert lots of text...<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
TAlk about overthinking it, haha! Happy you found out what it was. <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
TAlk about overthinking it, haha! Happy you found out what it was. <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>